You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by gs...@apache.org on 2006/11/15 16:07:29 UTC
svn commit: r475257 -
/incubator/harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ThreadTest.java
Author: gshimansky
Date: Wed Nov 15 07:07:29 2006
New Revision: 475257
URL: http://svn.apache.org/viewvc?view=rev&rev=475257
Log:
Applied HARMONY-2193 [drlvm][kernel test] Kernel unit test ThreadTest.testInterrupt_CurrentThread fails sometimes
Tests passed on ubuntu and win 2003 server. The testcase testJoinlongint still fails on win 2003 server
Modified:
incubator/harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ThreadTest.java
Modified: incubator/harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ThreadTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ThreadTest.java?view=diff&rev=475257&r1=475256&r2=475257
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ThreadTest.java (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ThreadTest.java Wed Nov 15 07:07:29 2006
@@ -38,7 +38,7 @@
"thread has been unexpectedly interrupted";
// max time interval to wait for some events in ms
- private static final long waitDuration = 3000;
+ private static final long waitDuration = 60000;
// waiting time for some event
private long waitTime = 0;
@@ -60,7 +60,7 @@
}
private class Team {
- public int i = 0;
+ public volatile int i = 0;
volatile boolean stopProject = false;
public synchronized void work() {
@@ -1322,12 +1322,6 @@
}
};
t.start();
- waitTime = waitDuration;
- while (!t.isAlive() && !(expired = doSleep(10))) {
- }
- if (expired) {
- fail("unexpected: thread has not started");
- }
waitTime = waitDuration;
while (!t.isInterrupted() && !(expired = doSleep(10))) {
}