incubator-kato-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From monte...@apache.org
Subject svn commit: r887295 - /incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/scenario142/javaruntime/TestJavaMonitor_ObjectMonitors.java
Date Fri, 04 Dec 2009 17:45:46 GMT
Author: monteith
Date: Fri Dec  4 17:45:46 2009
New Revision: 887295

URL: http://svn.apache.org/viewvc?rev=887295&view=rev
Log:
Fix test that was inadvertently order sensitive to notify thread order.

Modified:
    incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/scenario142/javaruntime/TestJavaMonitor_ObjectMonitors.java

Modified: incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/scenario142/javaruntime/TestJavaMonitor_ObjectMonitors.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/scenario142/javaruntime/TestJavaMonitor_ObjectMonitors.java?rev=887295&r1=887294&r2=887295&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/scenario142/javaruntime/TestJavaMonitor_ObjectMonitors.java
(original)
+++ incubator/kato/trunk/org.apache.kato/kato.tck/testcases/src/main/java/org/apache/kato/tck/scenario142/javaruntime/TestJavaMonitor_ObjectMonitors.java
Fri Dec  4 17:45:46 2009
@@ -767,13 +767,11 @@
 		int count = 0;
 		Iterator waiters = monitor.getNotifyWaiters().iterator();
 
-		while (waiters.hasNext()) {
-			JavaThread next = (JavaThread) waiters.next();
-			assertEquals("Waiters name incorrect", generatePrefix(2, 0, 0)
-					+ "-" + SetupJavaMonitor_ObjectMonitors.monitorNotifyThreadName + "-" + count, next
-					.getName());
-			count++;
-		}
+		
+		String error = checkNames(waiters, generatePrefix(2, 0, 0) + "-"
+				+ SetupJavaMonitor_ObjectMonitors.monitorNotifyThreadName, 2);
+		
+		assertNull(error,error);
 	}
 
 	public void testNameEnters_2_0_0() throws Exception {



Mime
View raw message