harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wjwashb...@apache.org
Subject svn commit: r584549 - /harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ThreadTest.java
Date Sun, 14 Oct 2007 14:29:28 GMT
Author: wjwashburn
Date: Sun Oct 14 07:29:28 2007
New Revision: 584549

URL: http://svn.apache.org/viewvc?rev=584549&view=rev
Log:
Harmony-4766:  this is the classlib test patch called H-4766-classlib-test.patch
It tests H-4766.patch (which fixes ThreadGroup.destroy() problems)

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ThreadTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ThreadTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ThreadTest.java?rev=584549&r1=584548&r2=584549&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ThreadTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ThreadTest.java
Sun Oct 14 07:29:28 2007
@@ -262,10 +262,13 @@
 	 */
 	public void test_activeCount() {
 		// Test for method int java.lang.Thread.activeCount()
-		Thread t = new Thread(new SimpleThread(1));
-		int active = Thread.activeCount();
-		assertTrue("Incorrect read made: " + active, active > 0);
-		t.start();
+		Thread t = new Thread(new SimpleThread(10));
+		int active = 0;
+		synchronized (t) {
+			t.start();
+			active = Thread.activeCount();
+		}
+		assertTrue("Incorrect activeCount for current group: " + active, active > 1);
 		try {
 			t.join();
 		} catch (InterruptedException e) {



Mime
View raw message