[jboss-cvs] JBoss Messaging SVN: r3493 - branches/Branch_Stable/tests/src/org/jboss/test/messaging/jms.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Dec 12 18:09:38 EST 2007
Author: timfox
Date: 2007-12-12 18:09:38 -0500 (Wed, 12 Dec 2007)
New Revision: 3493
Modified:
branches/Branch_Stable/tests/src/org/jboss/test/messaging/jms/ConnectionFactoryTest.java
Log:
tweak
Modified: branches/Branch_Stable/tests/src/org/jboss/test/messaging/jms/ConnectionFactoryTest.java
===================================================================
--- branches/Branch_Stable/tests/src/org/jboss/test/messaging/jms/ConnectionFactoryTest.java 2007-12-12 22:49:10 UTC (rev 3492)
+++ branches/Branch_Stable/tests/src/org/jboss/test/messaging/jms/ConnectionFactoryTest.java 2007-12-12 23:09:38 UTC (rev 3493)
@@ -384,10 +384,13 @@
class SlowListener implements MessageListener
{
+ volatile int processed;
public void onMessage(Message msg)
{
TextMessage tm = (TextMessage)msg;
+
+ processed++;
try
{
@@ -412,14 +415,17 @@
}
log.info("Waited");
}
+
+ waitLock.notify();
}
}
}
+
+ final SlowListener slow = new SlowListener();
-
MessageConsumer cons1 = session1.createConsumer(queue1);
- cons1.setMessageListener(new SlowListener());
+ cons1.setMessageListener(slow);
MessageConsumer cons2 = session2.createConsumer(queue1);
@@ -450,10 +456,19 @@
waitLock.wait(20000);
log.info("Waited");
}
+
+ while (slow.processed != 2)
+ {
+ log.info("Waiting");
+ waitLock.wait(20000);
+ log.info("Waited");
+ }
}
assertTrue(fast.processed == numMessages - 2);
+ // Thread.sleep(10000);
+
}
finally
{
More information about the jboss-cvs-commits
mailing list