We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50beed2 commit f7821d1Copy full SHA for f7821d1
src/test/java/org/csanchez/jenkins/plugins/kubernetes/pipeline/KubernetesPipelineTest.java
@@ -131,6 +131,17 @@ public void allDead() throws Exception {
131
for (int i = 0; i < 100 && r.isSomethingHappening(); i++) {
132
Thread.sleep(100);
133
}
134
+ Jenkins.get().getNodes().stream()
135
+ .filter(KubernetesSlave.class::isInstance)
136
+ .map(KubernetesSlave.class::cast)
137
+ .forEach(agent -> {
138
+ LOGGER.info(() -> "Deleting remaining node " + agent);
139
+ try {
140
+ agent.terminate();
141
+ } catch (InterruptedException | IOException e) {
142
+ LOGGER.log(Level.WARNING, "Failed to terminate " + agent, e);
143
+ }
144
+ });
145
146
147
@Issue("JENKINS-57993")
0 commit comments