[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/loader ...

Brian Stansberry brian.stansberry at jboss.com
Wed Nov 22 16:38:30 EST 2006


  User: bstansberry
  Date: 06/11/22 16:38:30

  Modified:    tests/functional/org/jboss/cache/loader  Tag:
                        JBossCache_1_3_0_SP3_JBCACHE-873
                        CacheLoaderWithReplicationTest.java
  Log:
  Deal properly with Windows
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.16.2.1.4.1 +13 -2     JBossCache/tests/functional/org/jboss/cache/loader/CacheLoaderWithReplicationTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheLoaderWithReplicationTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/CacheLoaderWithReplicationTest.java,v
  retrieving revision 1.16.2.1
  retrieving revision 1.16.2.1.4.1
  diff -u -b -r1.16.2.1 -r1.16.2.1.4.1
  --- CacheLoaderWithReplicationTest.java	8 May 2006 19:33:39 -0000	1.16.2.1
  +++ CacheLoaderWithReplicationTest.java	22 Nov 2006 21:38:30 -0000	1.16.2.1.4.1
  @@ -48,14 +48,25 @@
       public void setUp() throws Exception
       {
           cache1 = new TreeCache();
  -        cache1.setCacheLoaderConfiguration(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.bdbje.BdbjeCacheLoader", "location=" + tmpLocation1, false, true, false));
  +        cache1.setCacheLoaderConfiguration(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.bdbje.BdbjeCacheLoader", "location=" + escapePath(tmpLocation1), false, true, false));
           cache1.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
   
           cache2 = new TreeCache();
  -        cache2.setCacheLoaderConfiguration(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.bdbje.BdbjeCacheLoader", "location=" + tmpLocation2, false, true, false));
  +        cache2.setCacheLoaderConfiguration(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.bdbje.BdbjeCacheLoader", "location=" + escapePath(tmpLocation2), false, true, false));
           cache2.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
       }
   
  +    private String escapePath(String path)
  +    {
  +       String escaped = path;
  +       if (path.indexOf(":\\") > -1)
  +       {
  +          escaped = path.replace("\\\\", "\\");
  +          escaped = escaped.replace("\\", "\\\\");
  +       }
  +       return escaped;
  +    }
  +
       public void tearDown() throws Exception
       {
           if (cache1 != null)
  
  
  



More information about the jboss-cvs-commits mailing list