Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8165285

java/net/Socket/SocksConnectTimeout.java fails intermittently

    Details

      Description

      java/net/Socket/SocksConnectTimeout.java

      Test fails intermittently with: java.net.SocketException: connect timed out
      Test wrapped the exception (see line 82 and 124), no exception stack trace printed, which is not good.

      Test expects to get SocketTimeoutException via connectWithTimeout:
          static void connectWithTimeout(Socket socket) throws IOException {
              socket.connect(new InetSocketAddress(InetAddress.getLocalHost(), 1234), 500);
          }
      this might not work well (as expected) when other tests run in concurrency.

      Failure log:

      ----------System.out:(2/72)----------
      Connect timeout test failed
      java.net.SocketException: connect timed out
      ----------System.err:(12/755)----------
      java.lang.RuntimeException: Test Failed: passed:0, failed:1
      at SocksConnectTimeout.main(SocksConnectTimeout.java:67)
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)
      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:535)
      at com.sun.javatest.regtest.agent.MainActionHelper$SameVMRunnable.run(MainActionHelper.java:226)
      at java.lang.Thread.run(java.base@9-ea/Thread.java:843)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                chegar Chris Hegarty
                Reporter:
                amlu Amy Lu
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: