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

remoting unit tests fail on windows (AGAIN!)

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • remoting
    • Windows

    Description

      checkout remoting...

      mvn package

      expect there are no test failures

      actual results

      lots of test failiures and errors.

      Results :
      
      Failed tests:   mkdirs(hudson.remoting.UtilTest)
        smokes(org.jenkinsci.remoting.protocol.impl.AckFilterLayerTest): smokes(nonBlocking, blocking)
        serverSendsShortAck(org.jenkinsci.remoting.protocol.impl.AckFilterLayerTest): serverSendsShortAck(blocking, nonBlocking)
        smokes(org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayerTest): smokes(nonBlocking, blocking)
        clientRefuses(org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayerTest): clientRefuses(blocking, nonBlocking)
        clientRejects(org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayerTest): clientRejects(blocking, nonBlocking)
        serverRefuses(org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayerTest): serverRefuses(nonBlocking, blocking)
        serverRejects(org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayerTest): serverRejects(nonBlocking, blocking)
        smokes(org.jenkinsci.remoting.protocol.impl.NetworkLayerTest): smokes(nonBlocking, blocking)
        doCloseRecv(org.jenkinsci.remoting.protocol.impl.NetworkLayerTest): doCloseRecv(nonBlocking, blocking)
        smokes(org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayerTest): smokes(nonBlocking, blocking)
        expiredClientDoesNotConnect(org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayerTest): expiredClientDoesNotConnect(nonBlocking, blocking)
      
      Tests in error:
        testGetResources(hudson.remoting.PrefetchingTest): Unable to delete file: C:\Users\jnord\AppData\Local\Temp\remoting6046553684965680968cache\B0\5BB4D36C30A77AAE2989D2B457E251.jar
        testGetResource(hudson.remoting.PrefetchingTest): Unable to delete file: C:\Users\jnord\AppData\Local\Temp\remoting3228395545947973438cache\7F\CE79BB8C55572F4D2C34ABECD36F76.jar
        testJarLoadingTest(hudson.remoting.PrefetchingTest): Unable to delete file: C:\Users\jnord\AppData\Local\Temp\remoting6491026365913196608cache\7F\CE79BB8C55572F4D2C34ABECD36F76.jar
      
      Tests run: 489, Failures: 12, Errors: 3, Skipped: 0
      
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 28:58 min
      [INFO] Finished at: 2016-10-04T14:19:50+01:00
      [INFO] Final Memory: 28M/365M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.9:test (default-test) on project remoting: There are test failures.
      

      Attachments

        Issue Links

          Activity

            oleg_nenashev Oleg Nenashev added a comment -

            Not a blocker since there are other platforms, which could be used for builds for now

            oleg_nenashev Oleg Nenashev added a comment - Not a blocker since there are other platforms, which could be used for builds for now

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/main/java/hudson/remoting/ResourceImageInJar.java
            http://jenkins-ci.org/commit/remoting/35c651aa007ae9e8f7f80f5782439e1864614c0d
            Log:
            JENKINS-38696 - Allow disabling caching of files in ResourceImageInJar

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/ResourceImageInJar.java http://jenkins-ci.org/commit/remoting/35c651aa007ae9e8f7f80f5782439e1864614c0d Log: JENKINS-38696 - Allow disabling caching of files in ResourceImageInJar

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            pom.xml
            src/main/java/hudson/remoting/Channel.java
            src/main/java/hudson/remoting/ChannelBuilder.java
            src/main/java/hudson/remoting/ImportedClassLoaderTable.java
            src/main/java/hudson/remoting/RemoteClassLoader.java
            src/main/java/hudson/remoting/ResourceImageBoth.java
            src/main/java/hudson/remoting/ResourceImageInJar.java
            src/main/java/org/jenkinsci/remoting/nio/NioChannelBuilder.java
            src/test/java/hudson/remoting/NioPipeRunner.java
            src/test/java/hudson/remoting/PrefetchingTest.java
            src/test/java/hudson/remoting/RmiTestBase.java
            http://jenkins-ci.org/commit/remoting/144922e5de65244729fbd8de2a610daa90ea13e1
            Log:
            JENKINS-38696 - Save the progress

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml src/main/java/hudson/remoting/Channel.java src/main/java/hudson/remoting/ChannelBuilder.java src/main/java/hudson/remoting/ImportedClassLoaderTable.java src/main/java/hudson/remoting/RemoteClassLoader.java src/main/java/hudson/remoting/ResourceImageBoth.java src/main/java/hudson/remoting/ResourceImageInJar.java src/main/java/org/jenkinsci/remoting/nio/NioChannelBuilder.java src/test/java/hudson/remoting/NioPipeRunner.java src/test/java/hudson/remoting/PrefetchingTest.java src/test/java/hudson/remoting/RmiTestBase.java http://jenkins-ci.org/commit/remoting/144922e5de65244729fbd8de2a610daa90ea13e1 Log: JENKINS-38696 - Save the progress

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/test/java/hudson/remoting/PrefetchingTest.java
            http://jenkins-ci.org/commit/remoting/40fa6a11f9eaf6826990544b1304c7ac6c9bab1c
            Log:
            JENKINS-38696 - PrefetchingTest should disable JAR caching by default in Windows

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/test/java/hudson/remoting/PrefetchingTest.java http://jenkins-ci.org/commit/remoting/40fa6a11f9eaf6826990544b1304c7ac6c9bab1c Log: JENKINS-38696 - PrefetchingTest should disable JAR caching by default in Windows

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/test/java/hudson/remoting/RmiTestBase.java
            http://jenkins-ci.org/commit/remoting/f08455cc7946cc784149ea9e2ebda256ace600f1
            Log:
            JENKINS-38696 - Allow interactive mode for File Leak Detector in RmiTestBase

            Compare: https://github.com/jenkinsci/remoting/compare/368060752fda^...f08455cc7946

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/test/java/hudson/remoting/RmiTestBase.java http://jenkins-ci.org/commit/remoting/f08455cc7946cc784149ea9e2ebda256ace600f1 Log: JENKINS-38696 - Allow interactive mode for File Leak Detector in RmiTestBase Compare: https://github.com/jenkinsci/remoting/compare/368060752fda ^...f08455cc7946

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            pom.xml
            src/test/java/hudson/remoting/PrefetchingTest.java
            http://jenkins-ci.org/commit/remoting/2549cfdd25254a0f53ba3884ea6c5f54513d9021
            Log:
            JENKINS-38696 - Cleanup the manual testing leftovers

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml src/test/java/hudson/remoting/PrefetchingTest.java http://jenkins-ci.org/commit/remoting/2549cfdd25254a0f53ba3884ea6c5f54513d9021 Log: JENKINS-38696 - Cleanup the manual testing leftovers

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            pom.xml
            http://jenkins-ci.org/commit/remoting/1f17a7fd8c190a61ffe8c2a448fc807aaa740954
            Log:
            JENKINS-38696 - Pass the original ARG to Maven line as suggested by @jtnord

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/remoting/1f17a7fd8c190a61ffe8c2a448fc807aaa740954 Log: JENKINS-38696 - Pass the original ARG to Maven line as suggested by @jtnord

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            pom.xml
            http://jenkins-ci.org/commit/remoting/6bbb6d50bf6bbfa1ec0c4279632a07d9830a0f68
            Log:
            JENKINS-38696 - Use Unix path delimiters to specify the File Leak Detector path

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/remoting/6bbb6d50bf6bbfa1ec0c4279632a07d9830a0f68 Log: JENKINS-38696 - Use Unix path delimiters to specify the File Leak Detector path

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            Jenkinsfile
            http://jenkins-ci.org/commit/remoting/d5d237eb3efd8fda18171f0454fa79e7bcf07aae
            Log:
            [JENKINS-46341] - Disable Windows build for now

            It just does not make sense while JENKINS-38696(https://issues.jenkins-ci.org/browse/JENKINS-38696) is not fixed

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: Jenkinsfile http://jenkins-ci.org/commit/remoting/d5d237eb3efd8fda18171f0454fa79e7bcf07aae Log: [JENKINS-46341] - Disable Windows build for now It just does not make sense while JENKINS-38696 ( https://issues.jenkins-ci.org/browse/JENKINS-38696 ) is not fixed

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            Jenkinsfile
            http://jenkins-ci.org/commit/remoting/408c0cbb3961847850acdb45471392b0ac457eb2
            Log:
            Merge pull request #191 from jenkinsci/buildflow/JENKINS-38696

            [JENKINS-46341] - Disable Windows build for now

            Compare: https://github.com/jenkinsci/remoting/compare/f5945de55013...408c0cbb3961

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: Jenkinsfile http://jenkins-ci.org/commit/remoting/408c0cbb3961847850acdb45471392b0ac457eb2 Log: Merge pull request #191 from jenkinsci/buildflow/ JENKINS-38696 [JENKINS-46341] - Disable Windows build for now Compare: https://github.com/jenkinsci/remoting/compare/f5945de55013...408c0cbb3961

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/test/java/org/jenkinsci/remoting/engine/WorkDirManagerTest.java
            http://jenkins-ci.org/commit/remoting/f13059a5a92070eae34bd95a4d8ccf0d50819ec0
            Log:
            JENKINS-38696 - Fix Work Directory Manager tests on Windows.

            Tests with file access modifications will be skipped, but all other tests are passing now.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/test/java/org/jenkinsci/remoting/engine/WorkDirManagerTest.java http://jenkins-ci.org/commit/remoting/f13059a5a92070eae34bd95a4d8ccf0d50819ec0 Log: JENKINS-38696 - Fix Work Directory Manager tests on Windows. Tests with file access modifications will be skipped, but all other tests are passing now.

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/test/java/org/jenkinsci/remoting/engine/WorkDirManagerTest.java
            http://jenkins-ci.org/commit/remoting/89de3cf6a7132375b9110fa8356ada8a3e417159
            Log:
            Merge pull request #219 from oleg-nenashev/tests/JENKINS-38696-WorkDirManager

            JENKINS-38696 - Fix Work Directory Manager tests on Windows.

            Compare: https://github.com/jenkinsci/remoting/compare/239f63583815...89de3cf6a713

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/test/java/org/jenkinsci/remoting/engine/WorkDirManagerTest.java http://jenkins-ci.org/commit/remoting/89de3cf6a7132375b9110fa8356ada8a3e417159 Log: Merge pull request #219 from oleg-nenashev/tests/ JENKINS-38696 -WorkDirManager JENKINS-38696 - Fix Work Directory Manager tests on Windows. Compare: https://github.com/jenkinsci/remoting/compare/239f63583815...89de3cf6a713

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/test/java/hudson/remoting/UtilTest.java
            http://jenkins-ci.org/commit/remoting/f2388146eacf5261cce311463294dac6681bdb24
            Log:
            JENKINS-38696 - huson.remoting.UtilTest#mkdirs() should not try creating global paths on Windows.

            On Windows you CAN create such directories.
            But it does not mean we should try it even in tests.

            Ideally the test needs to be rewritten or removed at all.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/test/java/hudson/remoting/UtilTest.java http://jenkins-ci.org/commit/remoting/f2388146eacf5261cce311463294dac6681bdb24 Log: JENKINS-38696 - huson.remoting.UtilTest#mkdirs() should not try creating global paths on Windows. On Windows you CAN create such directories. But it does not mean we should try it even in tests. Ideally the test needs to be rewritten or removed at all.

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/test/java/hudson/remoting/UtilTest.java
            http://jenkins-ci.org/commit/remoting/40def984ff65bafcc3b595094567f47d9e6c9d15
            Log:
            Merge pull request #220 from oleg-nenashev/tests/JENKINS-38696-remoting-Util-mkdirs

            JENKINS-38696 - huson.remoting.UtilTest#mkdirs() should not try creating global paths on Windows.

            Compare: https://github.com/jenkinsci/remoting/compare/3813f304f95e...40def984ff65

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/test/java/hudson/remoting/UtilTest.java http://jenkins-ci.org/commit/remoting/40def984ff65bafcc3b595094567f47d9e6c9d15 Log: Merge pull request #220 from oleg-nenashev/tests/ JENKINS-38696 -remoting-Util-mkdirs JENKINS-38696 - huson.remoting.UtilTest#mkdirs() should not try creating global paths on Windows. Compare: https://github.com/jenkinsci/remoting/compare/3813f304f95e...40def984ff65

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/test/java/hudson/remoting/PrefetchingTest.java
            http://jenkins-ci.org/commit/remoting/276621c4e913d807aab8885514784d5740e6ccd7
            Log:
            JENKINS-38696 - Do not delete temporary files in Windows in PrefetchingTest.

            It's a bit weird, but the test uses real classloader, which keeps the files open.
            Ideally the tests needs to be fixed in order to stop keeping handlers in JVM, but it's not the top priority right now.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/test/java/hudson/remoting/PrefetchingTest.java http://jenkins-ci.org/commit/remoting/276621c4e913d807aab8885514784d5740e6ccd7 Log: JENKINS-38696 - Do not delete temporary files in Windows in PrefetchingTest. It's a bit weird, but the test uses real classloader, which keeps the files open. Ideally the tests needs to be fixed in order to stop keeping handlers in JVM, but it's not the top priority right now.

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/test/java/hudson/remoting/PrefetchingTest.java
            http://jenkins-ci.org/commit/remoting/58e2cd2bae79315d8be544b7db8b8705f0bc9c93
            Log:
            Merge pull request #222 from oleg-nenashev/tests/JENKINS-38696-JARPrefetch

            JENKINS-38696 - Do not delete temporary files in Windows in PrefetchingTest.

            Compare: https://github.com/jenkinsci/remoting/compare/d27971d93386...58e2cd2bae79

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/test/java/hudson/remoting/PrefetchingTest.java http://jenkins-ci.org/commit/remoting/58e2cd2bae79315d8be544b7db8b8705f0bc9c93 Log: Merge pull request #222 from oleg-nenashev/tests/ JENKINS-38696 -JARPrefetch JENKINS-38696 - Do not delete temporary files in Windows in PrefetchingTest. Compare: https://github.com/jenkinsci/remoting/compare/d27971d93386...58e2cd2bae79

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            Jenkinsfile
            src/main/java/org/jenkinsci/remoting/protocol/IOHub.java
            http://jenkins-ci.org/commit/remoting/a916c6474de134874818c9847253fb163d360dbc
            Log:
            [JENKINS-47965, JENKINS-38696] - IOHub should not wait infinitely for Selector in Windows. (#221)

            • [JENKINS-47965, JENKINS-38696] - IOHub should not wait infinitely for Selector in Windows.

            Windows implementation of NIO Channel Selector does not request "Select now" in https://github.com/jenkinsci/remoting/blob/6165d6fb6a71a7f4fce52ce5fc4cac479052ce04/src/main/java/org/jenkinsci/remoting/protocol/IOHub.java#L436 and hence calls selector#select()... and this method has no timeout.
            When the code gets into this branch, Selector will be waiting infinitely without calling selector#isOpen(). Such implementation relies on the Selector implementation, which shout interrupt the select() wait if the selector is being closed. But apparently it does not no my machine (Win 10, amd64, Oracle JDK 8u131)

            This change adds wait timeout and makes the IOHub implementation to loop in the logic.

            • JENKINS-47965 - Lame implementation of IOHub Selector wakeup thread for Windows
            • JENKINS-47965 - Replace Thread.sleep() by object wait()/notify()
            • JENKINS-47965 - Address comments from @jtnord, run Selector Watcher in Unix systems as well
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: Jenkinsfile src/main/java/org/jenkinsci/remoting/protocol/IOHub.java http://jenkins-ci.org/commit/remoting/a916c6474de134874818c9847253fb163d360dbc Log: [JENKINS-47965, JENKINS-38696] - IOHub should not wait infinitely for Selector in Windows. (#221) [JENKINS-47965, JENKINS-38696] - IOHub should not wait infinitely for Selector in Windows. Windows implementation of NIO Channel Selector does not request "Select now" in https://github.com/jenkinsci/remoting/blob/6165d6fb6a71a7f4fce52ce5fc4cac479052ce04/src/main/java/org/jenkinsci/remoting/protocol/IOHub.java#L436 and hence calls selector#select()... and this method has no timeout. When the code gets into this branch, Selector will be waiting infinitely without calling selector#isOpen(). Such implementation relies on the Selector implementation, which shout interrupt the select() wait if the selector is being closed. But apparently it does not no my machine (Win 10, amd64, Oracle JDK 8u131) This change adds wait timeout and makes the IOHub implementation to loop in the logic. JENKINS-47965 - Lame implementation of IOHub Selector wakeup thread for Windows JENKINS-47965 - Polish the implementation JENKINS-38696 - Add Windows back to CI and make @jtnord happy JENKINS-47965 - Simplify the logic JENKINS-47965 - Replace Thread.sleep() by object wait()/notify() JENKINS-47965 - Cleanup the locking logic JENKINS-47965 - Address comments from @jtnord, run Selector Watcher in Unix systems as well
            oleg_nenashev Oleg Nenashev added a comment -

            The change has been released in Remoting 3.15 and integrated towards Jenkins 2.98

            oleg_nenashev Oleg Nenashev added a comment - The change has been released in Remoting 3.15 and integrated towards Jenkins 2.98

            People

              oleg_nenashev Oleg Nenashev
              teilo James Nord
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: