[jboss-cvs] JBossAS SVN: r62754 - branches/Branch_4_2/testsuite/src/main/org/jboss/test/cluster/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed May 2 15:18:24 EDT 2007


Author: bstansberry at jboss.com
Date: 2007-05-02 15:18:24 -0400 (Wed, 02 May 2007)
New Revision: 62754

Modified:
   branches/Branch_4_2/testsuite/src/main/org/jboss/test/cluster/test/FamilyClusterInfoUnitTestCase.java
Log:
Isolate the FCI used in the different test cases

Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/cluster/test/FamilyClusterInfoUnitTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/cluster/test/FamilyClusterInfoUnitTestCase.java	2007-05-02 18:41:25 UTC (rev 62753)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/cluster/test/FamilyClusterInfoUnitTestCase.java	2007-05-02 19:18:24 UTC (rev 62754)
@@ -103,11 +103,14 @@
       
       void endUpdates()
       {
-         long start = System.currentTimeMillis();
-         
-         while (started && (System.currentTimeMillis() - start) < 100)
+         if (started)
          {
             stopped = true;
+            try
+            {
+               this.join(250);
+            }
+            catch (InterruptedException ignored) {}
          }
          
          if (started)
@@ -203,11 +206,16 @@
       ArrayList targets = new ArrayList();
       targets.add("ONE");
       targets.add("TWO");
-      ClusteringTargetsRepository.initTarget("testSynchronization", targets, 0);
-      FamilyClusterInfo fci = ClusteringTargetsRepository.getFamilyClusterInfo("testSynchronization");
+      ClusteringTargetsRepository.initTarget("testImmutability", targets, 0);
+      FamilyClusterInfo fci = ClusteringTargetsRepository.getFamilyClusterInfo("testImmutability");
       
       ArrayList fciTargets = fci.getTargets();
       
+      // Confirm the targets are what we expect
+      assertEquals("Expected number of targets", 2, fciTargets.size());
+      assertEquals("First target as expected", "ONE", fciTargets.get(0));
+      assertEquals("Second target as expected", "TWO", fciTargets.get(1));
+      
       try 
       { 
          fciTargets.add("FAIL");




More information about the jboss-cvs-commits mailing list