• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None
    • Windows8(64bit), Jenkins 1.517

      Using a slave in a plugin test with JenkinsRule (Junit4 based), it fails with a following error:

      hudson.util.IOException2: Failed to clean up temp dirs
      	at org.jvnet.hudson.test.TemporaryDirectoryAllocator.dispose(TemporaryDirectoryAllocator.java:87)
      	at org.jvnet.hudson.test.TestEnvironment.dispose(TestEnvironment.java:78)
      	at org.jvnet.hudson.test.HudsonTestCase.tearDown(HudsonTestCase.java:420)
      	at junit.framework.TestCase.runBare(TestCase.java:146)
      	at org.jvnet.hudson.test.HudsonTestCase.runBare(HudsonTestCase.java:297)
      	at junit.framework.TestResult$1.protect(TestResult.java:122)
      	at junit.framework.TestResult.runProtected(TestResult.java:142)
      	at junit.framework.TestResult.run(TestResult.java:125)
      	at junit.framework.TestCase.run(TestCase.java:129)
      	at junit.framework.TestSuite.runTest(TestSuite.java:255)
      	at junit.framework.TestSuite.run(TestSuite.java:250)
      	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
      	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
      	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
      	at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172)
      	at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70)
      Caused by: java.io.IOException: Unable to delete C:\Users\ikedam\AppData\Local\Temp\hudson4683007175849200528test\logs\slaves\slave0\slave.log
      	at hudson.Util.deleteFile(Util.java:253)
      	at hudson.Util.deleteRecursive(Util.java:305)
      	at hudson.Util.deleteContentsRecursive(Util.java:202)
      	at hudson.Util.deleteRecursive(Util.java:296)
      	at hudson.Util.deleteContentsRecursive(Util.java:202)
      	at hudson.Util.deleteRecursive(Util.java:296)
      	at hudson.Util.deleteContentsRecursive(Util.java:202)
      	at hudson.Util.deleteRecursive(Util.java:296)
      	at hudson.Util.deleteContentsRecursive(Util.java:202)
      	at hudson.Util.deleteRecursive(Util.java:296)
      	at hudson.FilePath$11.invoke(FilePath.java:1040)
      	at hudson.FilePath$11.invoke(FilePath.java:1037)
      	at hudson.FilePath.act(FilePath.java:905)
      	at hudson.FilePath.act(FilePath.java:878)
      	at hudson.FilePath.deleteRecursive(FilePath.java:1037)
      	at org.jvnet.hudson.test.TemporaryDirectoryAllocator.dispose(TemporaryDirectoryAllocator.java:82)
      	... 23 more
      

          [JENKINS-18259] Unable to delete slave.log in plugin tests

          ikedam added a comment -

          I found that with HudsonTestCase, the problem happens again in Jenkins >= 1.482.
          And this log with JenkinsRule does not cause test failures.

          ikedam added a comment - I found that with HudsonTestCase, the problem happens again in Jenkins >= 1.482. And this log with JenkinsRule does not cause test failures.

          ikedam added a comment -

          This seems caused in following ways:

          • HudsonTestCase
            • org.jvnet.hudson.test.HudsonTestCase$ComputerListenerImpl is not registered to Jenkins.
            • This is for changes to TestExtensionLoader with Jenkins 1.482, 5dd905f2a2 and 4557a436bf.
          • JenkinsRule
            • Just not deleted temporary files with Jenkins < 1.482. It would fail at the beginning.
            • org.jvnet.hudson.test.JenkinsRule.ComputerListenerImpl exists, but does not work at all.

          ikedam added a comment - This seems caused in following ways: HudsonTestCase org.jvnet.hudson.test.HudsonTestCase$ComputerListenerImpl is not registered to Jenkins. This is for changes to TestExtensionLoader with Jenkins 1.482, 5dd905f2a2 and 4557a436bf . JenkinsRule Just not deleted temporary files with Jenkins < 1.482. It would fail at the beginning. org.jvnet.hudson.test.JenkinsRule.ComputerListenerImpl exists, but does not work at all.

          ikedam added a comment -

          ikedam added a comment - https://github.com/jenkinsci/jenkins/pull/814

          Code changed in jenkins
          User: ikedam
          Path:
          test/src/test/java/org/jvnet/hudson/test/HudsonTestCaseShutdownSlaveTest.java
          http://jenkins-ci.org/commit/jenkins/8c5cf05fc5646745cddb7b3eb5dda104adafe1d1
          Log:
          JENKINS-18259 added a test to reproduce JENKINS-18259.
          (cherry picked from commit 9c4cb4b5eca4fbeba5730b66f52042f647075ff8)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: test/src/test/java/org/jvnet/hudson/test/HudsonTestCaseShutdownSlaveTest.java http://jenkins-ci.org/commit/jenkins/8c5cf05fc5646745cddb7b3eb5dda104adafe1d1 Log: JENKINS-18259 added a test to reproduce JENKINS-18259 . (cherry picked from commit 9c4cb4b5eca4fbeba5730b66f52042f647075ff8)

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          test/src/main/java/org/jvnet/hudson/test/ChannelShutdownListener.java
          test/src/main/java/org/jvnet/hudson/test/EndOfTestListener.java
          test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java
          test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java
          http://jenkins-ci.org/commit/jenkins/80cf49068fe242c198ae2ba9ea3106e4bf3140fa
          Log:
          [FIXED JENKINS-18259]

          Added a listener that gets called at the end of the test to provide opportunity for a cleanup.
          This avoids the code duplication between HudsonTestCase vs JenkinsRule, too.

          Compare: https://github.com/jenkinsci/jenkins/compare/10a072c7d496...80cf49068fe2

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: test/src/main/java/org/jvnet/hudson/test/ChannelShutdownListener.java test/src/main/java/org/jvnet/hudson/test/EndOfTestListener.java test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java http://jenkins-ci.org/commit/jenkins/80cf49068fe242c198ae2ba9ea3106e4bf3140fa Log: [FIXED JENKINS-18259] Added a listener that gets called at the end of the test to provide opportunity for a cleanup. This avoids the code duplication between HudsonTestCase vs JenkinsRule, too. Compare: https://github.com/jenkinsci/jenkins/compare/10a072c7d496...80cf49068fe2

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2635
          JENKINS-18259 added a test to reproduce JENKINS-18259. (Revision 8c5cf05fc5646745cddb7b3eb5dda104adafe1d1)
          [FIXED JENKINS-18259] (Revision 80cf49068fe242c198ae2ba9ea3106e4bf3140fa)

          Result = UNSTABLE
          kohsuke : 8c5cf05fc5646745cddb7b3eb5dda104adafe1d1
          Files :

          • test/src/test/java/org/jvnet/hudson/test/HudsonTestCaseShutdownSlaveTest.java

          kohsuke : 80cf49068fe242c198ae2ba9ea3106e4bf3140fa
          Files :

          • test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java
          • test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java
          • test/src/main/java/org/jvnet/hudson/test/ChannelShutdownListener.java
          • test/src/main/java/org/jvnet/hudson/test/EndOfTestListener.java

          dogfood added a comment - Integrated in jenkins_main_trunk #2635 JENKINS-18259 added a test to reproduce JENKINS-18259 . (Revision 8c5cf05fc5646745cddb7b3eb5dda104adafe1d1) [FIXED JENKINS-18259] (Revision 80cf49068fe242c198ae2ba9ea3106e4bf3140fa) Result = UNSTABLE kohsuke : 8c5cf05fc5646745cddb7b3eb5dda104adafe1d1 Files : test/src/test/java/org/jvnet/hudson/test/HudsonTestCaseShutdownSlaveTest.java kohsuke : 80cf49068fe242c198ae2ba9ea3106e4bf3140fa Files : test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java test/src/main/java/org/jvnet/hudson/test/ChannelShutdownListener.java test/src/main/java/org/jvnet/hudson/test/EndOfTestListener.java

          ikedam added a comment -

          I verified that 80cf49068fe242c198ae2ba9ea3106e4bf3140fa fixes the problem.
          I'll verify with 1.520.

          ikedam added a comment - I verified that 80cf49068fe242c198ae2ba9ea3106e4bf3140fa fixes the problem. I'll verify with 1.520.

          ikedam added a comment -

          Fixed in 1.520.

          ikedam added a comment - Fixed in 1.520.

          Code changed in jenkins
          User: ikedam
          Path:
          test/src/test/java/org/jvnet/hudson/test/HudsonTestCaseShutdownSlaveTest.java
          http://jenkins-ci.org/commit/jenkins-test-harness/ac6338d9b41e8ed17d89a3f97ddeca0073eb67c0
          Log:
          JENKINS-18259 added a test to reproduce JENKINS-18259.
          (cherry picked from commit 9c4cb4b5eca4fbeba5730b66f52042f647075ff8)

          Originally-Committed-As: 8c5cf05fc5646745cddb7b3eb5dda104adafe1d1

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: test/src/test/java/org/jvnet/hudson/test/HudsonTestCaseShutdownSlaveTest.java http://jenkins-ci.org/commit/jenkins-test-harness/ac6338d9b41e8ed17d89a3f97ddeca0073eb67c0 Log: JENKINS-18259 added a test to reproduce JENKINS-18259 . (cherry picked from commit 9c4cb4b5eca4fbeba5730b66f52042f647075ff8) Originally-Committed-As: 8c5cf05fc5646745cddb7b3eb5dda104adafe1d1

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          test/src/main/java/org/jvnet/hudson/test/ChannelShutdownListener.java
          test/src/main/java/org/jvnet/hudson/test/EndOfTestListener.java
          test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java
          test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java
          http://jenkins-ci.org/commit/jenkins-test-harness/5af0c749d34e81c2d4df80ccfc872a86067b8f37
          Log:
          [FIXED JENKINS-18259]

          Added a listener that gets called at the end of the test to provide opportunity for a cleanup.
          This avoids the code duplication between HudsonTestCase vs JenkinsRule, too.

          Originally-Committed-As: 80cf49068fe242c198ae2ba9ea3106e4bf3140fa

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: test/src/main/java/org/jvnet/hudson/test/ChannelShutdownListener.java test/src/main/java/org/jvnet/hudson/test/EndOfTestListener.java test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java http://jenkins-ci.org/commit/jenkins-test-harness/5af0c749d34e81c2d4df80ccfc872a86067b8f37 Log: [FIXED JENKINS-18259] Added a listener that gets called at the end of the test to provide opportunity for a cleanup. This avoids the code duplication between HudsonTestCase vs JenkinsRule, too. Originally-Committed-As: 80cf49068fe242c198ae2ba9ea3106e4bf3140fa

            Unassigned Unassigned
            ikedam ikedam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: