Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #222 from oleg-nenashev/tests/JENKINS-38696-JARPre…
…fetch

[JENKINS-38696] - Do not delete temporary files in Windows in PrefetchingTest.
  • Loading branch information
oleg-nenashev committed Nov 17, 2017
2 parents d27971d + 276621c commit 58e2cd2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/test/java/hudson/remoting/PrefetchingTest.java
Expand Up @@ -30,7 +30,7 @@ public class PrefetchingTest extends RmiTestBase implements Serializable {
private Checksum sum1,sum2;

@Override
protected void setUp() throws Exception {
protected void setUp() throws Exception {
super.setUp();

URL jar1 = getClass().getClassLoader().getResource("remoting-test-client.jar");
Expand Down Expand Up @@ -68,6 +68,13 @@ protected void tearDown() throws Exception {
cl.cleanup();
super.tearDown();

if (Launcher.isWindows()) {
// Current Resource loader implementation keep files open even if we close the classloader.
// This check has been never working correctly in Windows.
// TODO: Fix it as a part of JENKINS-38696
return;
}

// because the dir is used by FIleSystemJarCache to asynchronously load stuff
// we might fail to shut it down right away
for (int i=0; ; i++) {
Expand Down

0 comments on commit 58e2cd2

Please sign in to comment.