Uploaded image for project: 'HttpComponents HttpCore'
  1. HttpComponents HttpCore
  2. HTTPCORE-489

sometimes unit test will failed

    XMLWordPrintableJSON

Details

    • Test
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 5.0-alpha4
    • 5.0-beta1
    • HttpCore NIO
    • None
    • windows 7
      jdk:1.8.0_101

    Description

      org.apache.hc.core5.ssl.TestSSLContextBuilder.testSSLHanskshakeProtocolMismatch2()
      sometimes will run failed occasionally.
      for example, change the branch from master to the other banch,run mvn clean test command,
      change back to the master run the command,and change to the other branch ,run command
      twice change back ,run command(just run more times each branch and change to other branch run command several times).
      Doing steps above for some times, occasionally the unit test failed.
      out put is like this:

      Failed tests:
      TestSSLContextBuilder.testSSLHanskshakeProtocolMismatch2
      Expected: an instance of java.net.SocketException
      but: <javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_
      failure> is a javax.net.ssl.SSLHandshakeException
      Stacktrace was: javax.net.ssl.SSLHandshakeException: Received fatal alert: hands
      hake_failure

      the difference exception stack between failed and success test case are in attachment.
      I don't know if you can Recurrent this bug in your environment.And I am not
      sure If it is a bug or just something wrong with my environment.
      If make sure it is a bug,maybe we should except thrown IOException.class when environment is windows and jdk.version
      >= 1.8.

      Attachments

        1. SSLHandshakeException(failed case).txt
          3 kB
          silver9886
        2. SocketException(success case).txt
          3 kB
          silver9886

        Activity

          People

            Unassigned Unassigned
            silver9886 silver9886
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: