8211931: [ppc][testbug] runtime/jni/terminatedThread/TestTerminatedThread.java fails as threads don't terminate immediately
Reviewed-by: dholmes, mdoerr
This commit is contained in:
parent
7014d0bdf8
commit
1d8a27195c
@ -85,10 +85,14 @@ public class TestTerminatedThread {
|
||||
System.out.println("Calling getThreadCpuTime ...");
|
||||
long t1 = mbean.getThreadCpuTime(t.getId());
|
||||
if (t1 != -1) {
|
||||
throw new RuntimeException("Invalid ThreadCpuTime returned = " +
|
||||
t1 + " expected = -1");
|
||||
// At least on PPC, we know threads can still be around a short
|
||||
// instant. In some stress scenarios we seem to grab times of
|
||||
// new threads started with the same thread id. In these cases
|
||||
// we get here.
|
||||
System.out.println("Unexpected: thread still reports CPU time: " + t1);
|
||||
} else {
|
||||
System.out.println("Okay: getThreadCpuTime() reported -1 as expected");
|
||||
}
|
||||
System.out.println("Okay: getThreadCpuTime() reported -1 as expected");
|
||||
} else {
|
||||
System.out.println("Skipping Thread CPU time test as it's not supported");
|
||||
}
|
||||
@ -96,10 +100,14 @@ public class TestTerminatedThread {
|
||||
System.out.println("Calling getThreadUserTime ...");
|
||||
long t1 = mbean.getThreadUserTime(t.getId());
|
||||
if (t1 != -1) {
|
||||
throw new RuntimeException("Invalid ThreadUserTime returned = " +
|
||||
t1 + " expected = -1");
|
||||
// At least on PPC, we know threads can still be around a short
|
||||
// instant. In some stress scenarios we seem to grab times of
|
||||
// new threads started with the same thread id. In these cases
|
||||
// we get here.
|
||||
System.out.println("Unexpected: thread still reports User time: " + t1);
|
||||
} else {
|
||||
System.out.println("Okay: getThreadUserTime() reported -1 as expected");
|
||||
}
|
||||
System.out.println("Okay: getThreadUserTime() reported -1 as expected");
|
||||
|
||||
System.out.println("Calling getThreadInfo ...");
|
||||
ThreadInfo info = mbean.getThreadInfo(t.getId());
|
||||
|
Loading…
x
Reference in New Issue
Block a user