Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.3.0
    • Fix Version/s: 0.4.0
    • Labels:
      None
    • Environment:
      Linux, OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)

      Description

      ScpTest fails randomly on my system during "mvn test". I'm guessing some sort of race condition, because if I do absolutely nothing else while the test is running, it passes, but if I'm browsing a web page while the test runs in the background, its very likely to fail.

      $ cat sshd-core/target/surefire-reports/org.apache.sshd.ScpTest.txt
      -------------------------------------------------------------------------------
      Test set: org.apache.sshd.ScpTest
      -------------------------------------------------------------------------------
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.876 sec <<< FAILURE!
      testScp(org.apache.sshd.ScpTest) Time elapsed: 1.87 sec <<< ERROR!
      com.jcraft.jsch.JSchException: session is down
      at com.jcraft.jsch.Channel.connect(Channel.java:185)
      at com.jcraft.jsch.Channel.connect(Channel.java:144)
      at org.apache.sshd.ScpTest.readFileError(ScpTest.java:214)
      at org.apache.sshd.ScpTest.testScp(ScpTest.java:128)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
      at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
      at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
      at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
      at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
      at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
      at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
      at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
      at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
      at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
      at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
      at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
      at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
      at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
      at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
      at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
      at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)

        Activity

        Guillaume Nodet made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Guillaume Nodet [ gnt ]
        Fix Version/s 0.4.0 [ 12314444 ]
        Resolution Fixed [ 1 ]
        Hide
        Guillaume Nodet added a comment -

        Sending sshd-core/src/test/java/org/apache/sshd/ScpTest.java
        Transmitting file data .
        Committed revision 890868.

        To everyone: reopen if you still find issues (i.e. random failures).

        Show
        Guillaume Nodet added a comment - Sending sshd-core/src/test/java/org/apache/sshd/ScpTest.java Transmitting file data . Committed revision 890868. To everyone: reopen if you still find issues (i.e. random failures).
        Hide
        Guillaume Nodet added a comment -

        I've tried to enhance the tests a bit (see revision 882185).
        It seems a bit better, but I still have some tests hanging from time to time.

        Show
        Guillaume Nodet added a comment - I've tried to enhance the tests a bit (see revision 882185). It seems a bit better, but I still have some tests hanging from time to time.
        Shawn Pearce created issue -

          People

          • Assignee:
            Guillaume Nodet
            Reporter:
            Shawn Pearce
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development