Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-18259

Unable to delete slave.log in plugin tests

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Windows8(64bit), Jenkins 1.517
    • Similar Issues:

      Description

      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
      

        Attachments

          Issue Links

            Activity

            Hide
            dogfood 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
            Show
            dogfood 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
            Hide
            ikedam ikedam added a comment -

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

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

            Fixed in 1.520.

            Show
            ikedam ikedam added a comment - Fixed in 1.520.
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: