521 |
|
// Java9+ test classes |
522 |
|
if (atLeastJava9()) { |
523 |
|
String[] java9TestClassNames = { |
524 |
+ |
"AtomicBoolean9Test", |
525 |
+ |
"AtomicInteger9Test", |
526 |
+ |
"AtomicIntegerArray9Test", |
527 |
+ |
"AtomicLong9Test", |
528 |
+ |
"AtomicLongArray9Test", |
529 |
+ |
"AtomicReference9Test", |
530 |
+ |
"AtomicReferenceArray9Test", |
531 |
|
"ExecutorCompletionService9Test", |
532 |
|
}; |
533 |
|
addNamedTestClasses(suite, java9TestClassNames); |
986 |
|
* Uninteresting threads are filtered out. |
987 |
|
*/ |
988 |
|
static void dumpTestThreads() { |
989 |
+ |
SecurityManager sm = System.getSecurityManager(); |
990 |
+ |
if (sm != null) { |
991 |
+ |
try { |
992 |
+ |
System.setSecurityManager(null); |
993 |
+ |
} catch (SecurityException giveUp) { |
994 |
+ |
return; |
995 |
+ |
} |
996 |
+ |
} |
997 |
+ |
|
998 |
|
ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean(); |
999 |
|
System.err.println("------ stacktrace dump start ------"); |
1000 |
|
for (ThreadInfo info : threadMXBean.dumpAllThreads(true, true)) { |
1012 |
|
System.err.print(info); |
1013 |
|
} |
1014 |
|
System.err.println("------ stacktrace dump end ------"); |
1015 |
+ |
|
1016 |
+ |
if (sm != null) System.setSecurityManager(sm); |
1017 |
|
} |
1018 |
|
|
1019 |
|
/** |