ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/JSR166TestCase.java
(Generate patch)

Comparing jsr166/src/test/tck/JSR166TestCase.java (file contents):
Revision 1.169 by jsr166, Thu Oct 8 21:50:26 2015 UTC vs.
Revision 1.170 by jsr166, Thu Oct 8 22:39:57 2015 UTC

# Line 188 | Line 188 | public class JSR166TestCase extends Test
188          return (regex == null) ? null : Pattern.compile(regex);
189      }
190  
191 +    // Instrumentation to debug very rare, but very annoying hung test runs.
192      static volatile TestCase currentTestCase;
193 +    static volatile int currentRun = 0;
194      static {
195          Runnable checkForWedgedTest = new Runnable() { public void run() {
196              // avoid spurious reports with enormous runsPerTest
# Line 197 | Line 199 | public class JSR166TestCase extends Test
199                  try { MINUTES.sleep(timeoutMinutes); }
200                  catch (InterruptedException unexpected) { break; }
201                  if (lastTestCase == currentTestCase) {
202 +                    System.err.printf(
203 +                        "Looks like we're stuck running test: %s (%d/%d)%n",
204 +                        lastTestCase, currentRun, runsPerTest);
205                      System.err.println
206                          ("Looks like we're stuck running test: "
207 <                         + lastTestCase);
207 >                         + lastTestCase + " (" + currentRun + "/" + runsPerTest + ")");
208                      System.err.println("availableProcessors=" +
209                          Runtime.getRuntime().availableProcessors());
210                      dumpTestThreads();
# Line 222 | Line 227 | public class JSR166TestCase extends Test
227  
228      protected void runTest() throws Throwable {
229          for (int i = 0; i < runsPerTest; i++) {
230 +            currentRun = i;
231              if (profileTests)
232                  runTestProfiled();
233              else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines