JBoss Cache SVN: r7444 - in core/trunk/src/test: java/org/jboss/cache/util/internals/replicationlisteners and 2 other directories.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2009-01-10 22:11:46 -0500 (Sat, 10 Jan 2009)
New Revision: 7444
Modified:
core/trunk/src/test/java/org/jboss/cache/ResourceCleanupTest.java
core/trunk/src/test/java/org/jboss/cache/UnitTestCacheFactory.java
core/trunk/src/test/java/org/jboss/cache/util/internals/replicationlisteners/ReplicationListener.java
core/trunk/src/test/resources/configs/integration/web-session-cache-configs.xml
core/trunk/src/test/resources/unit-test-cache-service.xml
Log:
run tests on TCPGOSSIP
Modified: core/trunk/src/test/java/org/jboss/cache/ResourceCleanupTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/ResourceCleanupTest.java 2009-01-11 03:08:46 UTC (rev 7443)
+++ core/trunk/src/test/java/org/jboss/cache/ResourceCleanupTest.java 2009-01-11 03:11:46 UTC (rev 7444)
@@ -3,6 +3,7 @@
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.AfterSuite;
import org.jboss.cache.util.TestingUtil;
+import org.jgroups.stack.GossipRouter;
import java.io.File;
@@ -13,6 +14,8 @@
*/
public class ResourceCleanupTest
{
+ private GossipRouter router;
+
@BeforeSuite
public void removeTempDir()
{
@@ -49,8 +52,17 @@
System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~ ENVIRONMENT INFO ~~~~~~~~~~~~~~~~~~~~~~~~~~");
}
- public static void main(String[] args)
+
+ @BeforeSuite
+ public void startGossipRouter() throws Exception
{
- System.out.println("System.getProperties() = " + System.getProperties());
+ router = new GossipRouter(12000, "localhost");
+ router.start();
}
+
+ @AfterSuite
+ public void stopRouter() throws Exception
+ {
+ router.stop();
+ }
}
Modified: core/trunk/src/test/java/org/jboss/cache/UnitTestCacheFactory.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/UnitTestCacheFactory.java 2009-01-11 03:08:46 UTC (rev 7443)
+++ core/trunk/src/test/java/org/jboss/cache/UnitTestCacheFactory.java 2009-01-11 03:11:46 UTC (rev 7444)
@@ -14,6 +14,7 @@
import org.jboss.cache.config.parsing.XmlConfigurationParser2x;
import org.jboss.cache.factories.UnitTestConfigurationFactory;
import org.jboss.cache.util.TestingUtil;
+import org.jgroups.stack.GossipRouter;
import java.io.IOException;
import java.io.InputStream;
@@ -62,7 +63,7 @@
@Override
protected String initialValue()
{
- return uniqueAddr.getAndAdd(10) + "";
+ return uniqueAddr.getAndAdd(50) + "";
}
};
@@ -361,12 +362,15 @@
throw new IllegalStateException();
}
- // replace mcast_port
- pattern = Pattern.compile("initial_hosts=[^;]*");
- m = pattern.matcher(clusterConfig);
- if (m.find())
+ if (clusterConfig.indexOf("TCPGOSSIP") < 0) //onluy adjust for TCPPING
{
- clusterConfig = m.replaceFirst("initial_hosts=" + "127.0.0.1[" + newStartPort + "]");
+ // replace mcast_port
+ pattern = Pattern.compile("initial_hosts=[^;]*");
+ m = pattern.matcher(clusterConfig);
+ if (m.find())
+ {
+ clusterConfig = m.replaceFirst("initial_hosts=" + "127.0.0.1[" + newStartPort + "]");
+ }
}
return clusterConfig;
@@ -412,4 +416,12 @@
}
return null;
}
+
+
+ public static void main(String[] args) throws Exception
+ {
+ GossipRouter router = new GossipRouter(12000, "localhost");
+ router.start();
+
+ }
}
\ No newline at end of file
Modified: core/trunk/src/test/java/org/jboss/cache/util/internals/replicationlisteners/ReplicationListener.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/util/internals/replicationlisteners/ReplicationListener.java 2009-01-11 03:08:46 UTC (rev 7443)
+++ core/trunk/src/test/java/org/jboss/cache/util/internals/replicationlisteners/ReplicationListener.java 2009-01-11 03:11:46 UTC (rev 7444)
@@ -224,13 +224,21 @@
{
realOne.setParameters(commandId, parameters);
}
+
+ @Override
+ public String toString()
+ {
+ return "ReplicableCommandDelegate{" +
+ "realOne=" + realOne +
+ '}';
+ }
}
protected void postNonVisitableExecution(ReplicableCommand realOne)
{
expectedCommands.remove(realOne.getClass());
}
-
+
protected void postReplicateExecution(ReplicateCommand realOne)
{
Iterator<Class<? extends ReplicableCommand>> it = expectedCommands.iterator();
@@ -364,11 +372,17 @@
{
if (this.expectedCommands == null)
{
+
this.expectedCommands = new ArrayList<Class<? extends ReplicableCommand>>();
}
this.expectedCommands.addAll(Arrays.asList(expectedCommands));
}
+ public void reset()
+ {
+ if (expectedCommands != null) expectedCommands.clear();
+ }
+
protected boolean isRemoteCommand(Class clazz)
{
return clazz.equals(AnnounceBuddyPoolNameCommand.class) || clazz.equals(AssignToBuddyGroupCommand.class) ||
Modified: core/trunk/src/test/resources/configs/integration/web-session-cache-configs.xml
===================================================================
--- core/trunk/src/test/resources/configs/integration/web-session-cache-configs.xml 2009-01-11 03:08:46 UTC (rev 7443)
+++ core/trunk/src/test/resources/configs/integration/web-session-cache-configs.xml 2009-01-11 03:11:46 UTC (rev 7444)
@@ -341,26 +341,26 @@
</attribute>
<!-- Cache Loader for session passivation -->
- <attribute name="CacheLoaderConfig">
- <config>
- <passivation>true</passivation>
- <shared>false</shared>
+ <!--<attribute name="CacheLoaderConfig">-->
+ <!--<config>-->
+ <!--<passivation>true</passivation>-->
+ <!--<shared>false</shared>-->
- <purgeOnStartup>true</purgeOnStartup>
+ <!--<purgeOnStartup>true</purgeOnStartup>-->
- <cacheloader>
- <class>org.jboss.cache.loader.FileCacheLoader</class>
- <properties>
- location=${java.io.tmpdir}${/}session
- </properties>
- <async>false</async>
- <fetchPersistentState>true</fetchPersistentState>
- <ignoreModifications>false</ignoreModifications>
- <checkCharacterPortability>false</checkCharacterPortability>
- </cacheloader>
+ <!--<cacheloader>-->
+ <!--<class>org.jboss.cache.loader.FileCacheLoader</class>-->
+ <!--<properties>-->
+ <!--location=${java.io.tmpdir}${/}session-->
+ <!--</properties>-->
+ <!--<async>false</async>-->
+ <!--<fetchPersistentState>true</fetchPersistentState>-->
+ <!--<ignoreModifications>false</ignoreModifications>-->
+ <!--<checkCharacterPortability>false</checkCharacterPortability>-->
+ <!--</cacheloader>-->
- </config>
- </attribute>
+ <!--</config>-->
+ <!--</attribute>-->
<!--
JBoss Cache eviction is not needed; webapp or SFSB container
Modified: core/trunk/src/test/resources/unit-test-cache-service.xml
===================================================================
--- core/trunk/src/test/resources/unit-test-cache-service.xml 2009-01-11 03:08:46 UTC (rev 7443)
+++ core/trunk/src/test/resources/unit-test-cache-service.xml 2009-01-11 03:11:46 UTC (rev 7444)
@@ -210,11 +210,8 @@
oob_thread_pool.queue_max_size="100"
oob_thread_pool.rejection_policy="run"/>
- <TCPPING timeout="3000"
- initial_hosts="127.0.0.1[7800]"
- port_range="2"
- num_initial_members="1"/>
- <MERGE2 max_interval="100000"
+ <TCPGOSSIP timeout="3000" initial_hosts="127.0.0.1[12000]" num_initial_members="2"/>
+ <MERGE2 max_interval="100000"
min_interval="20000"/>
<FD_SOCK/>
<!--
@@ -280,10 +277,7 @@
oob_thread_pool.queue_max_size="100"
oob_thread_pool.rejection_policy="run"/>
- <TCPPING timeout="3000"
- initial_hosts="127.0.0.1[7800]"
- port_range="1"
- num_initial_members="1"/>
+ <TCPGOSSIP timeout="3000" initial_hosts="127.0.0.1[12000]" num_initial_members="2" />
<MERGE2 max_interval="100000"
min_interval="20000"/>
<FD_SOCK/>
15 years, 4 months
JBoss Cache SVN: r7443 - core/trunk/src/test/java/org/jboss/cache/integration/websession/util.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2009-01-10 22:08:46 -0500 (Sat, 10 Jan 2009)
New Revision: 7443
Modified:
core/trunk/src/test/java/org/jboss/cache/integration/websession/util/BuddyReplicationAssertions.java
Log:
also validate the cache loader
Modified: core/trunk/src/test/java/org/jboss/cache/integration/websession/util/BuddyReplicationAssertions.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/integration/websession/util/BuddyReplicationAssertions.java 2009-01-11 03:06:17 UTC (rev 7442)
+++ core/trunk/src/test/java/org/jboss/cache/integration/websession/util/BuddyReplicationAssertions.java 2009-01-11 03:08:46 UTC (rev 7443)
@@ -27,6 +27,9 @@
import org.jboss.cache.Cache;
import org.jboss.cache.Fqn;
import org.jboss.cache.Node;
+import org.jboss.cache.CacheSPI;
+import org.jboss.cache.loader.CacheLoader;
+import org.jboss.cache.loader.CacheLoaderManager;
import org.jboss.cache.buddyreplication.BuddyFqnTransformer;
import org.jboss.cache.buddyreplication.BuddyManager;
@@ -36,7 +39,7 @@
*/
public class BuddyReplicationAssertions
{
- public static void assertBuddyBackup(String contextHostName, String sessionId, Cache<Object, Object> owner, Cache<Object, Object> backup)
+ public static void assertBuddyBackup(String contextHostName, String sessionId, Cache<Object, Object> owner, Cache<Object, Object> backup) throws Exception
{
Fqn<String> fqn = Fqn.fromElements(FqnUtil.JSESSION, contextHostName, sessionId);
Map<Object, Object> owned = owner.getData(fqn);
@@ -59,21 +62,23 @@
assertBuddyTreeClear(contextHostName, sessionId, owner);
}
- public static void assertUnrelated(String contextHostName, String sessionId, Cache<Object, Object> cache)
+ public static void assertUnrelated(String contextHostName, String sessionId, Cache<Object, Object> cache) throws Exception
{
assertMainTreeClear(contextHostName, sessionId, cache);
assertBuddyTreeClear(contextHostName, sessionId, cache);
}
- public static void assertMainTreeClear(String contextHostName, String sessionId, Cache<Object, Object> cache)
+ public static void assertMainTreeClear(String contextHostName, String sessionId, Cache<Object, Object> cache) throws Exception
{
Fqn<String> fqn = Fqn.fromElements(FqnUtil.JSESSION, contextHostName, sessionId);
+ verifyCacheLoader(cache, fqn);
assert cache.getNode(fqn) == null : "found node for " + fqn + " on cache instance " + cache.getLocalAddress();
}
-
- public static void assertBuddyTreeClear(String contextHostName, String sessionId, Cache<Object, Object> cache)
+
+ public static void assertBuddyTreeClear(String contextHostName, String sessionId, Cache<Object, Object> cache) throws Exception
{
Fqn<String> fqn = Fqn.fromElements(FqnUtil.JSESSION, contextHostName, sessionId);
+ verifyCacheLoader(cache, fqn);
Node<Object, Object> bbRoot = cache.getNode(BuddyManager.BUDDY_BACKUP_SUBTREE_FQN);
if (bbRoot != null)
{
@@ -84,6 +89,17 @@
}
}
}
-
+
+ private static void verifyCacheLoader(Cache<Object, Object> cache, Fqn<String> fqn)
+ throws Exception
+ {
+ CacheLoaderManager loaderManager = ((CacheSPI) cache).getCacheLoaderManager();
+ if (loaderManager != null && loaderManager.getCacheLoader() != null)
+ {
+ CacheLoader cl = loaderManager.getCacheLoader();
+ assert !cl.exists(fqn) : "found node for " + fqn + " on cache loader of cache " + cache.getLocalAddress();
+ }
+ }
+
private BuddyReplicationAssertions() {}
}
15 years, 4 months
JBoss Cache SVN: r7442 - core/trunk/src/test/java/org/jboss/cache/buddyreplication.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2009-01-10 22:06:17 -0500 (Sat, 10 Jan 2009)
New Revision: 7442
Modified:
core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyPoolBroadcastTest.java
Log:
reduced timeout
Modified: core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyPoolBroadcastTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyPoolBroadcastTest.java 2009-01-11 00:37:50 UTC (rev 7441)
+++ core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyPoolBroadcastTest.java 2009-01-11 03:06:17 UTC (rev 7442)
@@ -33,7 +33,6 @@
@AfterMethod(alwaysRun = true)
public void tearDown() throws Exception
{
- long st = System.currentTimeMillis();
super.tearDown();
}
@@ -69,7 +68,7 @@
latch.countDown();
// allow a generous sleep time
- TestingUtil.blockUntilViewsReceived(caches.toArray(new CacheSPI[0]), 240000);
+ TestingUtil.blockUntilViewsReceived(caches.toArray(new CacheSPI[0]), 60000);
long timeout = System.currentTimeMillis() + 5000 * numCaches;
@@ -127,6 +126,7 @@
catch (Exception e)
{
e.printStackTrace();
+ log.error(e);
}
}
}
15 years, 4 months
JBoss Cache SVN: r7441 - core/trunk/src/test/resources.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2009-01-10 19:37:50 -0500 (Sat, 10 Jan 2009)
New Revision: 7441
Modified:
core/trunk/src/test/resources/unit-test-cache-service.xml
Log:
different dicovery config
Modified: core/trunk/src/test/resources/unit-test-cache-service.xml
===================================================================
--- core/trunk/src/test/resources/unit-test-cache-service.xml 2009-01-11 00:36:37 UTC (rev 7440)
+++ core/trunk/src/test/resources/unit-test-cache-service.xml 2009-01-11 00:37:50 UTC (rev 7441)
@@ -213,7 +213,7 @@
<TCPPING timeout="3000"
initial_hosts="127.0.0.1[7800]"
port_range="2"
- num_initial_members="3"/>
+ num_initial_members="1"/>
<MERGE2 max_interval="100000"
min_interval="20000"/>
<FD_SOCK/>
@@ -282,8 +282,8 @@
<TCPPING timeout="3000"
initial_hosts="127.0.0.1[7800]"
- port_range="2"
- num_initial_members="3"/>
+ port_range="1"
+ num_initial_members="1"/>
<MERGE2 max_interval="100000"
min_interval="20000"/>
<FD_SOCK/>
15 years, 4 months
JBoss Cache SVN: r7440 - core/trunk/src/test/java/org/jboss/cache/buddyreplication.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2009-01-10 19:36:37 -0500 (Sat, 10 Jan 2009)
New Revision: 7440
Modified:
core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithCacheLoaderTest.java
Log:
reduced timeout for view creation
Modified: core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithCacheLoaderTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithCacheLoaderTest.java 2009-01-10 12:18:03 UTC (rev 7439)
+++ core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithCacheLoaderTest.java 2009-01-11 00:36:37 UTC (rev 7440)
@@ -317,7 +317,7 @@
cache1.start();
cache2.start();
- TestingUtil.blockUntilViewsReceived(caches.toArray(new Cache[caches.size()]), 600000);
+ TestingUtil.blockUntilViewsReceived(caches.toArray(new Cache[caches.size()]), 60000);
TestingUtil.sleepThread(getSleepTimeout());
15 years, 4 months
JBoss Cache SVN: r7439 - in core/trunk/src/test/java/org/jboss/cache: loader and 2 other directories.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2009-01-10 07:18:03 -0500 (Sat, 10 Jan 2009)
New Revision: 7439
Modified:
core/trunk/src/test/java/org/jboss/cache/eviction/FIFOPolicyTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/LFUPolicyTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/LRUPolicyTest.java
core/trunk/src/test/java/org/jboss/cache/eviction/MRUPolicyTest.java
core/trunk/src/test/java/org/jboss/cache/loader/JDBCCacheLoaderStateTransferTest.java
core/trunk/src/test/java/org/jboss/cache/transaction/DeadlockTest.java
core/trunk/src/test/java/org/jboss/cache/transaction/pessimistic/ConcurrentTransactionalTest.java
Log:
renamed threads
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/FIFOPolicyTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/FIFOPolicyTest.java 2009-01-09 18:22:29 UTC (rev 7438)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/FIFOPolicyTest.java 2009-01-10 12:18:03 UTC (rev 7439)
@@ -288,6 +288,7 @@
e.printStackTrace();
if (t1_ex == null)
{
+ isTrue = false;
t1_ex = e;
}
}
@@ -301,7 +302,7 @@
List<MyPutter> putters = new ArrayList<MyPutter>();
for (int i = 0; i < 5; i++)
{
- MyPutter p = new MyPutter("Putter" + i);
+ MyPutter p = new MyPutter("FifoPolicyTestPutter" + i);
putters.add(p);
p.start();
}
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/LFUPolicyTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/LFUPolicyTest.java 2009-01-09 18:22:29 UTC (rev 7438)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/LFUPolicyTest.java 2009-01-10 12:18:03 UTC (rev 7439)
@@ -319,7 +319,7 @@
for (int i = 0; i < 5; i++)
{
- new MyPutter("Putter" + i).start();
+ new MyPutter("LFUPolicyTestPutter" + i).start();
}
int counter = 0;
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/LRUPolicyTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/LRUPolicyTest.java 2009-01-09 18:22:29 UTC (rev 7438)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/LRUPolicyTest.java 2009-01-10 12:18:03 UTC (rev 7439)
@@ -289,7 +289,7 @@
for (int i = 0; i < 10; i++)
{
- new MyPutter("Putter" + i).start();
+ new MyPutter("LRUPolicyTestPutter" + i).start();
}
int counter = 0;
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/MRUPolicyTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/MRUPolicyTest.java 2009-01-09 18:22:29 UTC (rev 7438)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/MRUPolicyTest.java 2009-01-10 12:18:03 UTC (rev 7439)
@@ -34,8 +34,8 @@
CacheSPI<Object, Object> cache;
long wakeupIntervalMillis = 0;
final String ROOT_STR = "/test";
- Throwable t1_ex, t2_ex;
- boolean isTrue;
+ volatile Throwable t1_ex, t2_ex;
+ volatile boolean isTrue;
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception
@@ -147,6 +147,7 @@
e.printStackTrace();
if (t1_ex == null)
{
+ isTrue = false;
t1_ex = e;
}
}
@@ -165,7 +166,7 @@
for (int i = 0; i < 5; i++)
{
- new MyPutter("Putter" + i).start();
+ new MyPutter("MRUPolicyTestPutter" + i).start();
}
int counter = 0;
Modified: core/trunk/src/test/java/org/jboss/cache/loader/JDBCCacheLoaderStateTransferTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/JDBCCacheLoaderStateTransferTest.java 2009-01-09 18:22:29 UTC (rev 7438)
+++ core/trunk/src/test/java/org/jboss/cache/loader/JDBCCacheLoaderStateTransferTest.java 2009-01-10 12:18:03 UTC (rev 7439)
@@ -44,7 +44,7 @@
* @author Mircea.Markus(a)jboss.com
* @since 3.0
*/
-@Test(groups = "functional", sequential = true, testName = "loader.JDBCCacheLoaderStateTransferTest")
+@Test(groups = "functional", testName = "loader.JDBCCacheLoaderStateTransferTest")
public class JDBCCacheLoaderStateTransferTest
{
@@ -105,6 +105,8 @@
}
+ //todo mmarkus this test takes forever on fedora 9/4 cpu. Fix it!
+ @Test (enabled = false)
public void testMoreState() throws Exception
{
long startTime = System.currentTimeMillis();
@@ -122,7 +124,7 @@
System.out.println("stateTranferTime = " + stateTranferTime);
for (int i = 0; i < 5012; i += 100)
{
- second.get("a/b/" + i, "k").equals("v");
+ assert second.get("a/b/" + i, "k").equals("v");
}
}
}
Modified: core/trunk/src/test/java/org/jboss/cache/transaction/DeadlockTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/transaction/DeadlockTest.java 2009-01-09 18:22:29 UTC (rev 7438)
+++ core/trunk/src/test/java/org/jboss/cache/transaction/DeadlockTest.java 2009-01-10 12:18:03 UTC (rev 7439)
@@ -239,8 +239,8 @@
public void testPutsAndRemovesOnParentAndChildNodes() throws InterruptedException
{
- ContinuousPutter putter = new ContinuousPutter("Putter", NODE);
- ContinuousRemover remover = new ContinuousRemover("Remover", PARENT_NODE);
+ ContinuousPutter putter = new ContinuousPutter("DeadlockTestPutter", NODE);
+ ContinuousRemover remover = new ContinuousRemover("DeadlockTestRemover", PARENT_NODE);
putter.start();
remover.start();
TestingUtil.sleepThread((long) 5000);
@@ -252,8 +252,8 @@
public void testPutsAndRemovesOnParentAndChildNodesReversed() throws InterruptedException
{
- ContinuousPutter putter = new ContinuousPutter("Putter", PARENT_NODE);
- ContinuousRemover remover = new ContinuousRemover("Remover", NODE);
+ ContinuousPutter putter = new ContinuousPutter("DeadlockTestPutter", PARENT_NODE);
+ ContinuousRemover remover = new ContinuousRemover("DeadlockTestRemover", NODE);
putter.start();
remover.start();
TestingUtil.sleepThread((long) 5000);
@@ -265,8 +265,8 @@
public void testPutsAndRemovesOnSameNode() throws InterruptedException
{
- ContinuousPutter putter = new ContinuousPutter("Putter", NODE);
- ContinuousRemover remover = new ContinuousRemover("Remover", NODE);
+ ContinuousPutter putter = new ContinuousPutter("DeadlockTestPutter", NODE);
+ ContinuousRemover remover = new ContinuousRemover("DeadlockTestRemover", NODE);
putter.start();
remover.start();
TestingUtil.sleepThread((long) 5000);
Modified: core/trunk/src/test/java/org/jboss/cache/transaction/pessimistic/ConcurrentTransactionalTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/transaction/pessimistic/ConcurrentTransactionalTest.java 2009-01-09 18:22:29 UTC (rev 7438)
+++ core/trunk/src/test/java/org/jboss/cache/transaction/pessimistic/ConcurrentTransactionalTest.java 2009-01-10 12:18:03 UTC (rev 7439)
@@ -91,8 +91,8 @@
long current = System.currentTimeMillis();
one.start();
two.start();
- one.join();
- two.join();
+ one.join(30000);
+ two.join(30000);
if (thread_ex != null)
{
throw thread_ex;
15 years, 4 months
JBoss Cache SVN: r7438 - core/trunk/src/test/java/org/jboss/cache.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2009-01-09 13:22:29 -0500 (Fri, 09 Jan 2009)
New Revision: 7438
Modified:
core/trunk/src/test/java/org/jboss/cache/ResourceCleanupTest.java
Log:
Modified: core/trunk/src/test/java/org/jboss/cache/ResourceCleanupTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/ResourceCleanupTest.java 2009-01-09 18:21:15 UTC (rev 7437)
+++ core/trunk/src/test/java/org/jboss/cache/ResourceCleanupTest.java 2009-01-09 18:22:29 UTC (rev 7438)
@@ -45,6 +45,7 @@
System.out.println("java.vm.version = " + System.getProperty("java.vm.version"));
System.out.println("os.name = " + System.getProperty("java.vm.version"));
System.out.println("os.version = " + System.getProperty("os.version"));
+ System.out.println("sun.arch.data.model = " + System.getProperty("sun.arch.data.model"));
System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~ ENVIRONMENT INFO ~~~~~~~~~~~~~~~~~~~~~~~~~~");
}
15 years, 4 months
JBoss Cache SVN: r7437 - core/trunk/src/test/java/org/jboss/cache/util.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2009-01-09 13:21:15 -0500 (Fri, 09 Jan 2009)
New Revision: 7437
Modified:
core/trunk/src/test/java/org/jboss/cache/util/TestingUtil.java
Log:
more detailed failure details
Modified: core/trunk/src/test/java/org/jboss/cache/util/TestingUtil.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/util/TestingUtil.java 2009-01-09 18:08:05 UTC (rev 7436)
+++ core/trunk/src/test/java/org/jboss/cache/util/TestingUtil.java 2009-01-09 18:21:15 UTC (rev 7437)
@@ -155,9 +155,20 @@
}
}
- throw new RuntimeException("timed out before caches had complete views");
+ throw new RuntimeException("timed out before caches had complete views" + views(caches));
}
+ private static String views(Cache... caches)
+ {
+ StringBuilder builder = new StringBuilder("[\n");
+ for (Cache c:caches)
+ {
+ builder.append(" ").append(c.getLocalAddress()).append("->").append(c.getMembers()).append("\n");
+ }
+ builder.append("]");
+ return builder.toString();
+ }
+
/**
* Version of blockUntilViewsReceived that uses varargs
*/
@@ -188,7 +199,7 @@
}
}
- throw new RuntimeException("timed out before caches had complete views");
+ throw new RuntimeException("timed out before caches had complete views" + views(caches));
}
@@ -215,7 +226,7 @@
}
}
- throw new RuntimeException("timed out before caches had complete views");
+ throw new RuntimeException("timed out before caches had complete views" + views(caches));
}
/**
@@ -245,7 +256,7 @@
}
}
- throw new RuntimeException("timed out before caches had complete views");
+ throw new RuntimeException("timed out before caches had complete views" + views(cache));
}
/**
15 years, 4 months
JBoss Cache SVN: r7436 - core/trunk.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2009-01-09 13:08:05 -0500 (Fri, 09 Jan 2009)
New Revision: 7436
Modified:
core/trunk/pom.xml
Log:
Updated parent pom to remove dependency on Derby
Modified: core/trunk/pom.xml
===================================================================
--- core/trunk/pom.xml 2009-01-09 17:57:40 UTC (rev 7435)
+++ core/trunk/pom.xml 2009-01-09 18:08:05 UTC (rev 7436)
@@ -14,7 +14,7 @@
<parent>
<groupId>org.jboss.cache</groupId>
<artifactId>jbosscache-common-parent</artifactId>
- <version>1.4</version>
+ <version>1.5</version>
</parent>
<groupId>org.jboss.cache</groupId>
<artifactId>jbosscache-core</artifactId>
15 years, 4 months
JBoss Cache SVN: r7435 - core/trunk/src/test/java/org/jboss/cache/buddyreplication.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2009-01-09 12:57:40 -0500 (Fri, 09 Jan 2009)
New Revision: 7435
Modified:
core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationTestsBase.java
Log:
more detailed failure details
Modified: core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationTestsBase.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationTestsBase.java 2009-01-09 17:57:00 UTC (rev 7434)
+++ core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationTestsBase.java 2009-01-09 17:57:40 UTC (rev 7435)
@@ -298,18 +298,23 @@
BuddyManager buddyBuddyManager = ((CacheSPI) buddy).getBuddyManager();
// lets test things on the data owner's side of things
- if (onlyBuddy) assertEquals("Should only have one buddy", 1, dataOwnerBuddyManager.getBuddyAddresses().size());
+ if (onlyBuddy) assertEquals("Should only have one buddy" + getViewsString(dataOwner, buddy), 1, dataOwnerBuddyManager.getBuddyAddresses().size());
- assertTrue(buddyLocalAddress + " should be a buddy to " + dataOwnerLocalAddress, dataOwnerBuddyManager.getBuddyAddresses().contains(buddyLocalAddress));
+ assertTrue(buddyLocalAddress + " should be a buddy to " + dataOwnerLocalAddress + getViewsString(dataOwner, buddy), dataOwnerBuddyManager.getBuddyAddresses().contains(buddyLocalAddress));
// and now on the buddy end
BuddyGroup group = buddyBuddyManager.buddyGroupsIParticipateIn.get(dataOwnerLocalAddress);
- assertTrue("buddy's list of groups it participates in should contain data owner's group name", buddyBuddyManager.buddyGroupsIParticipateIn.containsKey(dataOwnerLocalAddress));
+ assertTrue("buddy's list of groups it participates in should contain data owner's group name" + getViewsString(dataOwner, buddy), buddyBuddyManager.buddyGroupsIParticipateIn.containsKey(dataOwnerLocalAddress));
if (onlyBuddy) assertEquals(1, group.getBuddies().size());
- assertTrue(buddyLocalAddress + " should be a buddy to " + group.getGroupName(), group.getBuddies().contains(buddyLocalAddress));
+ assertTrue(buddyLocalAddress + " should be a buddy to " + group.getGroupName() + getViewsString(dataOwner, buddy), group.getBuddies().contains(buddyLocalAddress));
}
+ private static String getViewsString(Cache dataOwner, Cache buddy)
+ {
+ return "[dataOwnerView: {" + dataOwner.getMembers()+ "}, buddyViewIs: {" + buddy.getMembers() + "}]";
+ }
+
public static void waitForBuddy(Cache dataOwner, Cache buddy, boolean onlyBuddy) throws Exception
{
waitForBuddy(dataOwner, buddy, onlyBuddy, 60000);
15 years, 4 months