[jboss-cvs] JBoss Messaging SVN: r4000 - branches/Branch_Stable/tests/src/org/jboss/test/messaging/jms/clustering.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Apr 3 11:04:11 EDT 2008
Author: ataylor
Date: 2008-04-03 11:04:11 -0400 (Thu, 03 Apr 2008)
New Revision: 4000
Modified:
branches/Branch_Stable/tests/src/org/jboss/test/messaging/jms/clustering/MultipleFailoverTest.java
Log:
changes to test synchronisation
Modified: branches/Branch_Stable/tests/src/org/jboss/test/messaging/jms/clustering/MultipleFailoverTest.java
===================================================================
--- branches/Branch_Stable/tests/src/org/jboss/test/messaging/jms/clustering/MultipleFailoverTest.java 2008-04-03 14:44:06 UTC (rev 3999)
+++ branches/Branch_Stable/tests/src/org/jboss/test/messaging/jms/clustering/MultipleFailoverTest.java 2008-04-03 15:04:11 UTC (rev 4000)
@@ -21,22 +21,14 @@
*/
package org.jboss.test.messaging.jms.clustering;
+import org.jboss.jms.client.JBossConnection;
+import org.jboss.test.messaging.tools.ServerManagement;
+
+import javax.jms.*;
import java.util.Iterator;
import java.util.Set;
import java.util.TreeSet;
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
-import org.jboss.jms.client.JBossConnection;
-import org.jboss.test.messaging.tools.ServerManagement;
-
/**
* A test where we kill multiple nodes and make sure the failover works correctly in these condtions
* too.
@@ -244,7 +236,7 @@
count++;
- Thread.sleep(5);
+ //Thread.sleep(5);
}
log.info("done send");
@@ -443,20 +435,22 @@
{
log.info("here");
long toWait = 30000;
- while (maxcnt < i && toWait > 0)
+ while (maxcnt < i)
{
- long start = System.currentTimeMillis();
try
{
+ long time = System.currentTimeMillis();
obj.wait(60000);
+ long pause = System.currentTimeMillis() - time;
+ if(pause > 60000)
+ {
+ //we've time out
+ break;
}
+ }
catch (InterruptedException e)
{}
- if (maxcnt < i)
- {
- toWait -= System.currentTimeMillis() - start;
- }
- }
+ }
return maxcnt == i;
}
@@ -466,6 +460,7 @@
{
try
{
+ Thread.sleep(5);
int cnt = msg.getIntProperty("cnt");
if (cnt % 100 == 0)
More information about the jboss-cvs-commits
mailing list