changeset 7989:c5108c2b0bb9

RT-38663: Unit test timeout failure in ImageRace test
author kcr
date Mon, 15 Sep 2014 11:13:33 -0700
parents 957060db6fa5
children 8501205d226c
files tests/system/src/test/java/com/sun/javafx/image/impl/ImageRaceTest.java
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/system/src/test/java/com/sun/javafx/image/impl/ImageRaceTest.java	Mon Sep 15 11:37:20 2014 -0400
+++ b/tests/system/src/test/java/com/sun/javafx/image/impl/ImageRaceTest.java	Mon Sep 15 11:13:33 2014 -0700
@@ -31,6 +31,7 @@
 import javafx.application.Platform;
 import javafx.stage.Stage;
 import org.junit.Test;
+import static util.Util.TIMEOUT;
 
 public class ImageRaceTest extends Application {
     static boolean verbose;
@@ -70,7 +71,7 @@
     }
 
     void forkAndJoinInitializers() {
-        long limit = System.currentTimeMillis() + 1000;
+        long limit = System.currentTimeMillis() + TIMEOUT;
         for (Initializer i : initalizers) {
             i.start();
             while (!i.isRunning() && System.currentTimeMillis() < limit) {
@@ -87,7 +88,7 @@
         } catch (InterruptedException ex) {}
         ready = true;
 
-        limit = System.currentTimeMillis() + 3000;
+        limit = System.currentTimeMillis() + TIMEOUT;
         try {
             for (Initializer i : initalizers) {
                 long now = System.currentTimeMillis();