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.151 by jsr166, Sat Oct 3 19:19:01 2015 UTC vs.
Revision 1.155 by jsr166, Sat Oct 3 19:59:49 2015 UTC

# Line 461 | Line 461 | public class JSR166TestCase extends Test
461          } else {
462              return new TestSuite();
463          }
464
464      }
465  
466      // Delays for timing-dependent tests, in milliseconds.
# Line 519 | Line 518 | public class JSR166TestCase extends Test
518       * the same test have no effect.
519       */
520      public void threadRecordFailure(Throwable t) {
521 +        threadDump();
522          threadFailure.compareAndSet(null, t);
523      }
524  
# Line 529 | Line 529 | public class JSR166TestCase extends Test
529      void tearDownFail(String format, Object... args) {
530          String msg = toString() + ": " + String.format(format, args);
531          System.err.println(msg);
532 <        printAllStackTraces();
532 >        threadDump();
533          throw new AssertionFailedError(msg);
534      }
535  
# Line 598 | Line 598 | public class JSR166TestCase extends Test
598              fail(reason);
599          } catch (AssertionFailedError t) {
600              threadRecordFailure(t);
601 <            fail(reason);
601 >            throw t;
602          }
603      }
604  
# Line 800 | Line 800 | public class JSR166TestCase extends Test
800       * A debugging tool to print all stack traces, as jstack does.
801       * Uninteresting threads are filtered out.
802       */
803 <    static void printAllStackTraces() {
803 >    static void threadDump() {
804          ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();
805          System.err.println("------ stacktrace dump start ------");
806          for (ThreadInfo info : threadMXBean.dumpAllThreads(true, true)) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines