mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-14 04:22:16 +00:00
Only helpful to dump threads in case of a timeout.
For regular test failures this is normally just annoying noise.
This commit is contained in:
1 parent
593e55b236
commit
80da8f2958
1 file changed
+6
-6
@@ -386,6 +386,12 @@ public class JenkinsRule implements TestRule, MethodRule, RootAction {
|
||||
public void run() {
|
||||
if (timeoutTimer!=null) {
|
||||
LOGGER.warning(String.format("Test timed out (after %d seconds).", timeout));
|
||||
// dump threads
|
||||
ThreadInfo[] threadInfos = Functions.getThreadInfos();
|
||||
Functions.ThreadGroupMap m = Functions.sortThreadsAndGetGroupMap(threadInfos);
|
||||
for (ThreadInfo ti : threadInfos) {
|
||||
System.err.println(Functions.dumpThreadInfo(ti, m));
|
||||
}
|
||||
testThread.interrupt();
|
||||
}
|
||||
}
|
||||
@@ -490,12 +496,6 @@ public class JenkinsRule implements TestRule, MethodRule, RootAction {
|
||||
System.err.println("Note: known to randomly fail: " + rf.value());
|
||||
}
|
||||
|
||||
// dump threads
|
||||
ThreadInfo[] threadInfos = Functions.getThreadInfos();
|
||||
Functions.ThreadGroupMap m = Functions.sortThreadsAndGetGroupMap(threadInfos);
|
||||
for (ThreadInfo ti : threadInfos) {
|
||||
System.err.println(Functions.dumpThreadInfo(ti, m));
|
||||
}
|
||||
throw th;
|
||||
}
|
||||
} finally {
|
||||
|
||||
Reference in new issue
Block a user