r26645 - trunk/freenet/test/freenet/support

[email protected]
Newsgroups gmane.network.freenet.cvs
Message-ID <[email protected]>
Author: j16sdiz
Date: 2009-04-08 06:23:18 +0000 (Wed, 08 Apr 2009)
New Revision: 26645

Modified:
   trunk/freenet/test/freenet/support/PrioritizedSerialExecutorTest.java
Log:
Fix junit race condition

Modified: trunk/freenet/test/freenet/support/PrioritizedSerialExecutorTest.java
===================================================================
--- trunk/freenet/test/freenet/support/PrioritizedSerialExecutorTest.java	2009-04-08 05:39:47 UTC (rev 26644)
+++ trunk/freenet/test/freenet/support/PrioritizedSerialExecutorTest.java	2009-04-08 06:23:18 UTC (rev 26645)
@@ -133,9 +133,10 @@
 		assertEquals(0, exec.getQueueSize(1));
 		assertEquals(1, exec.getQueueSize(0));
 
+		int[] r = exec.queuedJobs();
 		assertTrue(
-			Arrays.equals(new int[] { 1, 0, 2, 0, 1, 0, 0, 0, 0, 0 }, exec.queuedJobs()) ||
-			Arrays.equals(new int[] { 1, 0, 2, 1, 1, 0, 0, 0, 0, 0 }, exec.queuedJobs())
+			Arrays.equals(new int[] { 1, 0, 2, 0, 1, 0, 0, 0, 0, 0 }, r) ||
+			Arrays.equals(new int[] { 1, 0, 2, 1, 1, 0, 0, 0, 0, 0 }, r)
 		);
 
 		waitFor(5); // JP, JQ, J2, JO, JR
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.