mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 21:42:27 +00:00
override the thread name to make the thread dump more useful, especially in case of a hang.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@27302 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
f68ab9ca82
commit
0478efb681
1 file changed
+13
@@ -222,6 +222,19 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
|
||||
protected HudsonTestCase() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void runBare() throws Throwable {
|
||||
// override the thread name to make the thread dump more useful.
|
||||
Thread t = Thread.currentThread();
|
||||
String o = getClass().getName()+'.'+t.getName();
|
||||
t.setName("Executing "+getName());
|
||||
try {
|
||||
super.runBare();
|
||||
} finally {
|
||||
t.setName(o);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
env.pin();
|
||||
|
||||
Reference in new issue
Block a user