Author: mircea.markus
Date: 2009-01-22 16:34:38 -0500 (Thu, 22 Jan 2009)
New Revision: 7575
Modified:
core/trunk/src/test/java/org/jboss/cache/buddyreplication/Buddy3NodesNoPoolNoDataGravitationTest.java
Log:
fix tests on jdk5
Modified:
core/trunk/src/test/java/org/jboss/cache/buddyreplication/Buddy3NodesNoPoolNoDataGravitationTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/buddyreplication/Buddy3NodesNoPoolNoDataGravitationTest.java 2009-01-22
21:19:34 UTC (rev 7574)
+++
core/trunk/src/test/java/org/jboss/cache/buddyreplication/Buddy3NodesNoPoolNoDataGravitationTest.java 2009-01-22
21:34:38 UTC (rev 7575)
@@ -16,7 +16,7 @@
/**
* @author Mircea.Markus(a)jboss.com
*/
-@Test(groups = "functional", testName =
"buddyreplication.Buddy3NodesNoPoolNoDataGravitationTest")
+@Test(groups = "functional", invocationCount = 10, testName =
"buddyreplication.Buddy3NodesNoPoolNoDataGravitationTest")
public class Buddy3NodesNoPoolNoDataGravitationTest extends AbstractNodeBasedBuddyTest
{
@@ -40,31 +40,6 @@
waitForBuddy(caches.get(2), caches.get(0), true);
}
- public void testRemovalFromClusterSingleBuddy() throws Exception
- {
- try
- {
- waitForBuddy(caches.get(0), caches.get(1), true);
- waitForBuddy(caches.get(1), caches.get(2), true);
- waitForBuddy(caches.get(2), caches.get(0), true);
-
- // now remove a cache from the cluster
- caches.get(2).stop();
-
- TestingUtil.sleepThread(getSleepTimeout());
-
- // now test new buddy groups
- waitForBuddy(caches.get(0), caches.get(1), true);
- waitForBuddy(caches.get(1), caches.get(0), true);
- assertNoLocks(caches);
- }
- finally
- {
- caches.get(2).start();
- replListener.set(2, ReplicationListener.getReplicationListener(caches.get(2)));
- }
- }
-
public void testSimplePut() throws Exception
{
String fqn = "/test";
@@ -169,4 +144,29 @@
assertFalse(caches.get(0).exists(backupFqn));
}
+ @Test(dependsOnMethods = {"testSingleBuddy", "testSimplePut",
"testPutAndRemove", "testDataReplicationSuppression"})
+ public void testRemovalFromClusterSingleBuddy() throws Exception
+ {
+ try
+ {
+ waitForBuddy(caches.get(0), caches.get(1), true);
+ waitForBuddy(caches.get(1), caches.get(2), true);
+ waitForBuddy(caches.get(2), caches.get(0), true);
+
+ // now remove a cache from the cluster
+ caches.get(2).stop();
+
+ TestingUtil.sleepThread(getSleepTimeout());
+
+ // now test new buddy groups
+ waitForBuddy(caches.get(0), caches.get(1), true);
+ waitForBuddy(caches.get(1), caches.get(0), true);
+ assertNoLocks(caches);
+ }
+ finally
+ {
+ caches.get(2).start();
+ replListener.set(2, ReplicationListener.getReplicationListener(caches.get(2)));
+ }
+ }
}
Show replies by date