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

            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: