File tree 2 files changed +2
-27
lines changed
src/test/java/com/cloudbees/jenkins/support
2 files changed +2
-27
lines changed Original file line number Diff line number Diff line change 70
70
<!-- https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ -->
71
71
<jenkins .baseline>2.479</jenkins .baseline>
72
72
<jenkins .version>${jenkins.baseline} .1</jenkins .version>
73
+ <!-- TODO https://github.com/jenkinsci/jenkins-test-harness/pull/921 -->
74
+ <jenkins-test-harness .version>2398.vd015803ca_4d3</jenkins-test-harness .version>
73
75
<gitHubRepo >jenkinsci/${project.artifactId}-plugin</gitHubRepo >
74
76
<spotless .check.skip>false</spotless .check.skip>
75
77
</properties >
Original file line number Diff line number Diff line change 20
20
import java .io .ByteArrayOutputStream ;
21
21
import java .io .File ;
22
22
import java .io .IOException ;
23
- import java .nio .file .DirectoryStream ;
24
23
import java .nio .file .Files ;
25
- import java .nio .file .LinkOption ;
26
- import java .nio .file .Path ;
27
24
import java .util .Map ;
28
25
import java .util .Objects ;
29
26
import java .util .Set ;
@@ -347,30 +344,6 @@ public static void stopAgents() throws Exception {
347
344
LOGGER .info ("stopping " + agent );
348
345
agent .toComputer ().disconnect (null ).get ();
349
346
}
350
- var dir = Jenkins .get ().getRootDir ().toPath ().resolve ("agent-work-dirs" );
351
- for (int i = 0 ; i < 60 ; i ++) {
352
- try {
353
- delete (dir );
354
- LOGGER .info ("successfully deleted " + dir );
355
- return ;
356
- } catch (IOException x ) {
357
- LOGGER .log (Level .WARNING , "failed to delete " + dir + " on attempt #" + i , x );
358
- Thread .sleep (1000 );
359
- }
360
- }
361
- LOGGER .warning ("never managed to delete " + dir );
362
- }
363
-
364
- private static void delete (Path p ) throws IOException {
365
- LOGGER .info (() -> "deleting " + p );
366
- if (Files .isDirectory (p , LinkOption .NOFOLLOW_LINKS )) {
367
- try (DirectoryStream <Path > children = Files .newDirectoryStream (p )) {
368
- for (Path child : children ) {
369
- delete (child );
370
- }
371
- }
372
- }
373
- Files .deleteIfExists (p );
374
347
}
375
348
376
349
private SupportTestUtils () {}
You can’t perform that action at this time.
0 commit comments