[jboss-cvs] JBossRemoting/src/tests/org/jboss/test/remoting/detection/jndi ...
Ron Sigal
ron_sigal at yahoo.com
Tue Nov 7 21:17:29 EST 2006
User: rsigal
Date: 06/11/07 21:17:29
Modified: src/tests/org/jboss/test/remoting/detection/jndi Tag:
remoting_2_x RestartTestClient.java
Log:
JBREM-581: Added a flag to prevent a race in case notifyDetection() is called before waitOnDetection().
Revision Changes Path
No revision
No revision
1.1.2.2 +14 -2 JBossRemoting/src/tests/org/jboss/test/remoting/detection/jndi/RestartTestClient.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: RestartTestClient.java
===================================================================
RCS file: /cvsroot/jboss/JBossRemoting/src/tests/org/jboss/test/remoting/detection/jndi/RestartTestClient.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -b -r1.1.2.1 -r1.1.2.2
--- RestartTestClient.java 2 Nov 2006 19:00:46 -0000 1.1.2.1
+++ RestartTestClient.java 8 Nov 2006 02:17:29 -0000 1.1.2.2
@@ -60,6 +60,7 @@
protected int serversDetected;
protected boolean invocationSucceeded;
protected Object lock = new Object();
+ protected boolean notified;
/**
@@ -228,8 +229,18 @@
{
synchronized (lock)
{
+ try
+ {
+ if (notified)
+ return;
+
lock.wait();
}
+ finally
+ {
+ notified = false;
+ }
+ }
}
@@ -237,6 +248,7 @@
{
synchronized (lock)
{
+ notified = true;
lock.notify();
}
}
More information about the jboss-cvs-commits
mailing list