[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/buddyreplication ...
Manik Surtani
msurtani at jboss.com
Thu Dec 21 12:59:01 EST 2006
User: msurtani
Date: 06/12/21 12:59:01
Modified: tests/functional/org/jboss/cache/buddyreplication
BuddyPoolBroadcastTest.java
Log:
Increased robustness
Revision Changes Path
1.16 +4 -3 JBossCache/tests/functional/org/jboss/cache/buddyreplication/BuddyPoolBroadcastTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: BuddyPoolBroadcastTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/buddyreplication/BuddyPoolBroadcastTest.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- BuddyPoolBroadcastTest.java 15 Sep 2006 15:11:35 -0000 1.15
+++ BuddyPoolBroadcastTest.java 21 Dec 2006 17:59:01 -0000 1.16
@@ -135,7 +135,7 @@
public void testConcurrency() throws Exception
{
log.debug("Running testConcurrency");
- int numCaches = 10;
+ int numCaches = 15;
caches = new TreeCache[numCaches];
Latch latch = new Latch();
CacheStarter[] starters = new CacheStarter[numCaches];
@@ -153,13 +153,14 @@
// allow a generous sleep time
TestingUtil.blockUntilViewsReceived(caches, 240000);
- TestingUtil.sleepThread(15000);
+ TestingUtil.sleepThread(1000 * numCaches); // the max timeout we can expect is 2500ms * 10 nodes
// and now look at the state of things.
Map map = caches[0].getBuddyManager().buddyPool;
+ System.out.println(map);
for (int i = 0; i < numCaches; i++)
{
- assertEquals("Failed on cache " + i, new String(new char[]{(char) ('A' + i)}), map.get(caches[i].getLocalAddress()));
+ assertEquals("Failed on cache " + i + "(" + caches[i].getLocalAddress() + ")", new String(new char[]{(char) ('A' + i)}), map.get(caches[i].getLocalAddress()));
}
checkConsistentPoolState(caches);
More information about the jboss-cvs-commits
mailing list