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.153 by jsr166, Sat Oct 3 19:37:43 2015 UTC vs.
Revision 1.154 by jsr166, Sat Oct 3 19:39:16 2015 UTC

# Line 519 | Line 519 | public class JSR166TestCase extends Test
519       * the same test have no effect.
520       */
521      public void threadRecordFailure(Throwable t) {
522 <        printAllStackTraces();
522 >        threadDump();
523          threadFailure.compareAndSet(null, t);
524      }
525  
# Line 530 | Line 530 | public class JSR166TestCase extends Test
530      void tearDownFail(String format, Object... args) {
531          String msg = toString() + ": " + String.format(format, args);
532          System.err.println(msg);
533 <        printAllStackTraces();
533 >        threadDump();
534          throw new AssertionFailedError(msg);
535      }
536  
# Line 801 | Line 801 | public class JSR166TestCase extends Test
801       * A debugging tool to print all stack traces, as jstack does.
802       * Uninteresting threads are filtered out.
803       */
804 <    static void printAllStackTraces() {
804 >    static void threadDump() {
805          ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();
806          System.err.println("------ stacktrace dump start ------");
807          for (ThreadInfo info : threadMXBean.dumpAllThreads(true, true)) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines