changeset 1060:70c53bc9a49d

6824583: regtest TimeUnit/Basic.java fails intermittently on Windows - again Reviewed-by: dholmes
author ohair
date Wed, 01 Apr 2009 09:08:54 -0700
parents b2530d839ecb
children 817bb60fbc26
files test/java/util/concurrent/TimeUnit/Basic.java
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/util/concurrent/TimeUnit/Basic.java	Tue Mar 31 16:14:14 2009 -0700
+++ b/test/java/util/concurrent/TimeUnit/Basic.java	Wed Apr 01 09:08:54 2009 -0700
@@ -60,10 +60,11 @@
         equal(1000L, MICROSECONDS.toNanos(1));
 
         long t0 = System.nanoTime();
-        MILLISECONDS.sleep(3);
+        MILLISECONDS.sleep(3); /* See windows bug 6313903, might not sleep */
         long elapsedMillis = (System.nanoTime() - t0)/(1000L * 1000L);
         System.out.printf("elapsed=%d%n", elapsedMillis);
-        check(elapsedMillis >= 3);
+        check(elapsedMillis >= 0);
+        /* Might not sleep on windows: check(elapsedMillis >= 3); */
         check(elapsedMillis < 1000);
 
         //----------------------------------------------------------------