You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by le...@apache.org on 2003/04/01 09:34:36 UTC
cvs commit: avalon-excalibur/compatibility/src/test/org/apache/avalon/excalibur/concurrent/test ReadWriteLockTestCase.java
leosutic 2003/03/31 23:34:36
Modified: compatibility/src/test/org/apache/avalon/excalibur/concurrent/test
ReadWriteLockTestCase.java
Log:
Another attempt. Removed the debugging code from previous commit and attempted
to eliminate the race condition that caused the test failure under GUMP.
Revision Changes Path
1.7 +6 -1 avalon-excalibur/compatibility/src/test/org/apache/avalon/excalibur/concurrent/test/ReadWriteLockTestCase.java
Index: ReadWriteLockTestCase.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/compatibility/src/test/org/apache/avalon/excalibur/concurrent/test/ReadWriteLockTestCase.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ReadWriteLockTestCase.java 31 Mar 2003 11:42:53 -0000 1.6
+++ ReadWriteLockTestCase.java 1 Apr 2003 07:34:36 -0000 1.7
@@ -364,7 +364,6 @@
*/
public void testDeadLock() throws Exception
{
- System.out.println( "testDeadLock():" );
ReadWriteLock lock = new ReadWriteLock();
TriesReadLock rla = new TriesReadLock( lock );
TriesReadLock rlb = new TriesReadLock( lock );
@@ -396,6 +395,12 @@
//
lock.release();
+ //
+ // Avoid race condition.
+ //
+ rla.join();
+ wla.join();
+
//
// Right, we are in the condition described by Drissman.
// Now try to aquire, in turn, a read and a write lock.
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org