jdk/test/com/sun/tools/attach/RunnerUtil.java
changeset 25155 8b98011eac74
parent 24268 43fb1c9e594c
child 25182 1f6766bac82c
--- a/jdk/test/com/sun/tools/attach/RunnerUtil.java	Mon Jun 23 10:57:22 2014 +0400
+++ b/jdk/test/com/sun/tools/attach/RunnerUtil.java	Mon Jun 23 15:51:41 2014 +0200
@@ -139,12 +139,19 @@
         String content = null;
 
         // Read file or wait for it to be created.
+        long startTime = System.currentTimeMillis();
+        long lastWarningTime = 0;
         while (true) {
             content = readFile(file);
             if (content != null && content.indexOf("done") >= 0) {
                 break;
             }
             Thread.sleep(100);
+            long elapsedTime = (System.currentTimeMillis() - startTime) / 1000;
+            if (elapsedTime > lastWarningTime) {
+                lastWarningTime = elapsedTime;
+                System.out.println("Waited " + elapsedTime + " seconds for file.");
+            }
         }
 
         ProcessInfo info = new ProcessInfo();