[infinispan-commits] Infinispan SVN: r897 - in trunk/core/src/test/java/org/infinispan/test: fwk and 1 other directory.

infinispan-commits at lists.jboss.org infinispan-commits at lists.jboss.org
Thu Oct 1 09:17:10 EDT 2009


Author: manik.surtani at jboss.com
Date: 2009-10-01 09:17:09 -0400 (Thu, 01 Oct 2009)
New Revision: 897

Modified:
   trunk/core/src/test/java/org/infinispan/test/MultipleCacheManagersTest.java
   trunk/core/src/test/java/org/infinispan/test/fwk/TestCacheManagerFactory.java
Log:
Reverted transport name in test fwk

Modified: trunk/core/src/test/java/org/infinispan/test/MultipleCacheManagersTest.java
===================================================================
--- trunk/core/src/test/java/org/infinispan/test/MultipleCacheManagersTest.java	2009-10-01 13:11:48 UTC (rev 896)
+++ trunk/core/src/test/java/org/infinispan/test/MultipleCacheManagersTest.java	2009-10-01 13:17:09 UTC (rev 897)
@@ -113,17 +113,8 @@
     *
     * @return the new CacheManager
     */
-   ThreadLocal<Integer> cacheCount = new ThreadLocal<Integer>() {
-      @Override
-      protected Integer initialValue() {
-         return 0;
-      }
-   };
    protected CacheManager addClusterEnabledCacheManager() {
-      int cmNumber = cacheCount.get();
-      cacheCount.set(cmNumber + 1);
-      String cacheName = "Cache-" + Character.toUpperCase((char) ('A' + cmNumber));
-      CacheManager cm = TestCacheManagerFactory.createClusteredCacheManager(cacheName);
+      CacheManager cm = TestCacheManagerFactory.createClusteredCacheManager();
       cacheManagers.add(cm);
       return cm;
    }

Modified: trunk/core/src/test/java/org/infinispan/test/fwk/TestCacheManagerFactory.java
===================================================================
--- trunk/core/src/test/java/org/infinispan/test/fwk/TestCacheManagerFactory.java	2009-10-01 13:11:48 UTC (rev 896)
+++ trunk/core/src/test/java/org/infinispan/test/fwk/TestCacheManagerFactory.java	2009-10-01 13:17:09 UTC (rev 897)
@@ -50,7 +50,12 @@
     * Creates an cache manager that does support clustering.
     */
    public static CacheManager createClusteredCacheManager() {
-      return createClusteredCacheManager((String) null);
+      GlobalConfiguration globalConfiguration = GlobalConfiguration.getClusteredDefault();
+      amendMarshaller(globalConfiguration);
+      Properties newTransportProps = new Properties();
+      newTransportProps.put(JGroupsTransport.CONFIGURATION_STRING, JGroupsConfigBuilder.getJGroupsConfig());
+      globalConfiguration.setTransportProperties(newTransportProps);
+      return new DefaultCacheManager(globalConfiguration);
    }
 
    /**
@@ -134,14 +139,4 @@
       if (transactional) amendJTA(c);
       return c;
    }
-
-   public static CacheManager createClusteredCacheManager(String cacheName) {
-      GlobalConfiguration globalConfiguration = GlobalConfiguration.getClusteredDefault();
-      amendMarshaller(globalConfiguration);
-      if (cacheName != null) globalConfiguration.setTransportNodeName(cacheName);
-      Properties newTransportProps = new Properties();
-      newTransportProps.put(JGroupsTransport.CONFIGURATION_STRING, JGroupsConfigBuilder.getJGroupsConfig());
-      globalConfiguration.setTransportProperties(newTransportProps);
-      return new DefaultCacheManager(globalConfiguration);
-   }
 }



More information about the infinispan-commits mailing list