|
12 | 12 | import com.cloudbees.jenkins.support.filter.ContentMappings;
|
13 | 13 | import hudson.model.Label;
|
14 | 14 | import hudson.slaves.DumbSlave;
|
15 |
| -import java.lang.management.ManagementFactory; |
16 |
| -import java.lang.management.ThreadInfo; |
17 |
| -import java.lang.management.ThreadMXBean; |
18 | 15 | import java.util.Objects;
|
19 | 16 | import java.util.Optional;
|
20 | 17 | import java.util.Scanner;
|
@@ -45,33 +42,7 @@ public class NodeExecutorsTest {
|
45 | 42 |
|
46 | 43 | @After
|
47 | 44 | public void after() throws InterruptedException, ExecutionException {
|
48 |
| - for (var agent : j.jenkins.getNodes()) { |
49 |
| - System.err.println("Stopping " + agent); |
50 |
| - agent.toComputer().disconnect(null).get(); |
51 |
| - } |
52 |
| - |
53 |
| - Thread.sleep(200); |
54 |
| - System.out.println("slept for 1 seconds -----"); |
55 |
| - |
56 |
| - // try { |
57 |
| - // j.after(); |
58 |
| - // }catch (Exception e){ |
59 |
| - // System.out.println("Tread dump -----"); |
60 |
| - // printThreadDump(); |
61 |
| - // } |
62 |
| - |
63 |
| - System.out.println("Tread dump -----"); |
64 |
| - printThreadDump(); |
65 |
| - } |
66 |
| - |
67 |
| - public static void printThreadDump() { |
68 |
| - ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean(); |
69 |
| - long[] threadIds = threadMXBean.getAllThreadIds(); |
70 |
| - ThreadInfo[] threadInfos = threadMXBean.getThreadInfo(threadIds, Integer.MAX_VALUE); |
71 |
| - |
72 |
| - for (ThreadInfo threadInfo : threadInfos) { |
73 |
| - System.out.println(threadInfo.toString()); |
74 |
| - } |
| 45 | + Thread.sleep(500); |
75 | 46 | }
|
76 | 47 |
|
77 | 48 | @Test
|
|
0 commit comments