[jboss-cvs] JBossAS SVN: r106732 - in trunk: testsuite/src/main/org/jboss/test/cluster/defaultcfg/test and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jul 14 21:45:27 EDT 2010
Author: smarlow at redhat.com
Date: 2010-07-14 21:45:26 -0400 (Wed, 14 Jul 2010)
New Revision: 106732
Modified:
trunk/component-matrix/pom.xml
trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/CacheManagerUnitTestCase.java
Log:
JBAS-8214 upgrade ha-server-cache-jbc to 3.0.0.Alpha1
Modified: trunk/component-matrix/pom.xml
===================================================================
--- trunk/component-matrix/pom.xml 2010-07-15 01:38:10 UTC (rev 106731)
+++ trunk/component-matrix/pom.xml 2010-07-15 01:45:26 UTC (rev 106732)
@@ -97,8 +97,8 @@
<version.org.jboss.cache.pojo>3.0.0.GA</version.org.jboss.cache.pojo>
<version.org.jboss.cl>2.2.0.Alpha7</version.org.jboss.cl>
<version.org.jboss.classpool>1.0.0.Alpha6</version.org.jboss.classpool>
- <version.org.jboss.cluster.cache.jbc>2.4.0.Alpha2</version.org.jboss.cluster.cache.jbc>
- <version.org.jboss.cluster.cache.spi>2.2.0.Final</version.org.jboss.cluster.cache.spi>
+ <version.org.jboss.cluster.cache.jbc>3.0.0.Alpha1</version.org.jboss.cluster.cache.jbc>
+ <version.org.jboss.cluster.cache.spi>3.0.0.Alpha1</version.org.jboss.cluster.cache.spi>
<version.org.jboss.cluster.client>1.1.1.GA</version.org.jboss.cluster.client>
<version.org.jboss.cluster.server.api>2.0.0.Alpha5</version.org.jboss.cluster.server.api>
<version.org.jboss.cluster.server.core>1.0.0.Alpha2</version.org.jboss.cluster.server.core>
Modified: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/CacheManagerUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/CacheManagerUnitTestCase.java 2010-07-15 01:38:10 UTC (rev 106731)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/CacheManagerUnitTestCase.java 2010-07-15 01:45:26 UTC (rev 106732)
@@ -203,104 +203,6 @@
}
/**
- * Same as testBasic() but here we ask for instances of PojoCache.
- *
- * @throws Exception
- */
- public void testBasicPojo() throws Exception
- {
- JChannelFactory cf = new JChannelFactory();
- cf.setMultiplexerConfig(DEFAULT_STACKS_FILE);
- cf.setExposeChannels(false);
- cf.start();
- CacheManager registry = new CacheManager(DEFAULT_CONFIGURATION_FILE, cf);
- registry.start();
-
- ConfigurationRegistry configRegistry = registry.getConfigurationRegistry();
-
- Set<String> configNames = registry.getConfigurationNames();
- assertEquals(7, configNames.size());
- Set<String> cacheNames = registry.getPojoCacheNames();
- assertEquals(0, cacheNames.size());
-
- for (String configName : configNames)
- {
- assertNull(configName + " not created", registry.getPojoCache(configName, false));
- PojoCache cache = registry.getPojoCache(configName, true);
- pojoCaches.add(cache);
-
- // Cache shouldn't be started
- assertEquals(CacheStatus.INSTANTIATED, cache.getCache().getCacheStatus());
- cache.create();
- cache.start();
-
- // Config should be a clone
- Configuration rawConfig = configRegistry.getConfiguration(configName);
- Configuration realConfig = cache.getCache().getConfiguration();
- assertFalse(rawConfig == realConfig);
- assertEquals(rawConfig.getClusterName(), realConfig.getClusterName());
- }
-
- cacheNames = registry.getPojoCacheNames();
- assertEquals(configNames, cacheNames);
-
- // Test basic releasing of caches
- for (String configName : configNames)
- {
- registry.releaseCache(configName);
- }
-
- cacheNames = registry.getPojoCacheNames();
- assertEquals(0, cacheNames.size());
-
- // We shouldn't have affected configuration set
- Set<String> configNames2 = registry.getConfigurationNames();
- assertEquals(configNames, configNames2);
-
- // Releasing only checkout of cache should have destroyed it
- for (Iterator<PojoCache> it = pojoCaches.iterator(); it.hasNext();)
- {
- assertEquals(CacheStatus.DESTROYED, it.next().getCache().getCacheStatus());
- it.remove();
- }
-
- // Get cache w/o asking to create returns null
- String configName = configNames.iterator().next();
- assertNull(configName + " not created", registry.getPojoCache(configName, false));
- // Get cache w/ asking to create returns cache
- PojoCache cache = registry.getPojoCache(configName, true);
- assertFalse(null == cache);
- pojoCaches.add(cache);
-
- cache.create();
- cache.start();
-
- // Test 2 checkouts of the same cache
- PojoCache cache2 = registry.getPojoCache(configName, true);
- assertEquals(cache, cache2);
-
- registry.releaseCache(configName);
-
- // One release does not cause registry to stop cache
- assertEquals(CacheStatus.STARTED, cache.getCache().getCacheStatus());
-
- registry.stop();
-
- // Should still not be stopped
- assertEquals(CacheStatus.STARTED, cache.getCache().getCacheStatus());
-
- registry.releaseCache(configName);
-
- // Now it should be stopped
- assertEquals(CacheStatus.DESTROYED, cache.getCache().getCacheStatus());
- caches.remove(cache);
-
- cacheNames = registry.getPojoCacheNames();
- assertEquals(0, cacheNames.size());
- assertEquals(cacheNames, registry.getConfigurationNames());
- }
-
- /**
* Confirms that the CacheManager can start if no config resource is provided.
*
* @throws Exception
@@ -329,9 +231,7 @@
assertEquals(7, configNames.size());
assertEquals(0, registry.getCacheNames().size());
-
- assertEquals(0, registry.getPojoCacheNames().size());
-
+
Map<String, String> aliases = new HashMap<String, String>();
aliases.put("alias", DEFAULT_STACK);
registry.setConfigAliases(aliases);
@@ -359,20 +259,6 @@
assertEquals(0, registry.getCacheNames().size());
- PojoCache pcache = registry.getPojoCache("alias", true);
- assertNotNull(pcache);
- PojoCache otherPC = registry.getPojoCache(DEFAULT_STACK, false);
- assertEquals(pcache, otherPC);
-
- assertEquals(1, registry.getPojoCacheNames().size());
-
- registry.releaseCache(DEFAULT_STACK);
-
- assertEquals(1, registry.getPojoCacheNames().size());
-
- registry.releaseCache("alias");
-
- assertEquals(0, registry.getPojoCacheNames().size());
}
public void testEagerStartCaches() throws Exception
@@ -387,15 +273,10 @@
cores.add("test1");
cores.add("test2");
registry.setEagerStartCaches(cores);
- Set<String> pojos = new HashSet<String>();
- pojos.add("test5");
- pojos.add("test6");
- registry.setEagerStartPojoCaches(pojos);
registry.start();
assertEquals(cores, registry.getCacheNames());
- assertEquals(pojos, registry.getPojoCacheNames());
Set<Cache> caches = new HashSet<Cache>();
@@ -406,26 +287,12 @@
assertEquals(CacheStatus.STARTED, cache.getCacheStatus());
caches.add(cache);
}
-
- for (String name : pojos)
- {
- PojoCache pojocache = registry.getPojoCache(name, false);
- assertNotNull(pojocache);
- Cache cache = pojocache.getCache();
- assertEquals(CacheStatus.STARTED, cache.getCacheStatus());
- caches.add(cache);
- }
-
+
for (String name : cores)
{
registry.releaseCache(name);
}
- for (String name : pojos)
- {
- registry.releaseCache(name);
- }
-
for (Cache cache : caches)
{
assertEquals(CacheStatus.STARTED, cache.getCacheStatus());
More information about the jboss-cvs-commits
mailing list