File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
test/jdk/java/lang/management/ThreadMXBean Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2003, 2015 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2003, 2024 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
@@ -177,6 +177,8 @@ private static void waitUntilThreadBlocked()
177177 }
178178 }
179179 }
180+ // Account for threads using CPU for a few millis after their WAITING state is visible:
181+ goSleep (500 );
180182 }
181183
182184 static class MyThread extends Thread {
@@ -228,15 +230,6 @@ public void run() {
228230 " CurrentThreadCpuTime = " + time1 +
229231 " > ThreadCpuTime = " + time2 );
230232 }
231- /*************
232- * FIXME: Seems that on Solaris-sparc,
233- * It occasionally returns a different current thread user time > thread user time
234- if (utime1 > utime2) {
235- throw new RuntimeException("TEST FAILED: " + getName() +
236- " CurrentThreadUserTime = " + utime1 +
237- " > ThreadUserTime = " + utime2);
238- }
239- */
240233 }
241234 }
242235
You can’t perform that action at this time.
0 commit comments