Index: src/test/org/apache/lucene/index/TestStressIndexing.java
===================================================================
--- src/test/org/apache/lucene/index/TestStressIndexing.java	(revision 891896)
+++ src/test/org/apache/lucene/index/TestStressIndexing.java	(working copy)
@@ -30,7 +30,7 @@
   private Random RANDOM;
 
   private static abstract class TimedThread extends Thread {
-    boolean failed;
+    volatile boolean failed;
     int count;
     private static int RUN_TIME_SEC = 1;
     private TimedThread[] allThreads;
@@ -48,10 +48,11 @@
       count = 0;
 
       try {
-        while(System.currentTimeMillis() < stopTime && !anyErrors()) {
+        do {
+          if (anyErrors()) break;
           doWork();
           count++;
-        }
+        } while(System.currentTimeMillis() < stopTime);
       } catch (Throwable e) {
         System.out.println(Thread.currentThread() + ": exc");
         e.printStackTrace(System.out);

