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

java/net/SocketPermission/SocketPermissionTest.java fails intermittently with java.net.ConnectException: Operation timed out

    Details

      Description

      This has been observed once on Mac OS X 10.10.5. No such failure observed in other test executions, so it is also probably a temporarily environment problem?

      Please refer the test output below:
      ----------System.out:(69/4385)----------
      [TestNG] Running:
        java/net/SocketPermission/SocketPermissionTest.java

      config SocketPermissionTest.setupSecurityManager(): success
      test SocketPermissionTest.acceptServerSocketTest(): success
      config SocketPermissionTest.setupSecurityManager(): success
      test SocketPermissionTest.connectDatagramSocketTest(): success
      config SocketPermissionTest.setupSecurityManager(): success
      test SocketPermissionTest.connectSocketTest(): failure
      java.security.PrivilegedActionException: java.net.ConnectException: Operation timed out (Connection timed out)
      at java.base/java.security.AccessController.doPrivileged(Native Method)
      at SocketPermissionTest.connectSocketTest(SocketPermissionTest.java:88)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:538)
      at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
      at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
      at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:821)
      at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131)
      at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124)
      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
      at org.testng.TestRunner.privateRun(TestRunner.java:773)
      at org.testng.TestRunner.run(TestRunner.java:623)
      at org.testng.SuiteRunner.runTest(SuiteRunner.java:357)
      at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352)
      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310)
      at org.testng.SuiteRunner.run(SuiteRunner.java:259)
      at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
      at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
      at org.testng.TestNG.runSuitesSequentially(TestNG.java:1185)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:1110)
      at org.testng.TestNG.run(TestNG.java:1018)
      at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:87)
      at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:538)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110)
      at java.base/java.lang.Thread.run(Thread.java:844)
      Caused by: java.net.ConnectException: Operation timed out (Connection timed out)
      at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:400)
      at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:243)
      at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:225)
      at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:402)
      at java.base/java.net.Socket.connect(Socket.java:591)
      at java.base/java.net.Socket.connect(Socket.java:540)
      at java.base/java.net.Socket.<init>(Socket.java:436)
      at java.base/java.net.Socket.<init>(Socket.java:246)
      at SocketPermissionTest.lambda$connectSocketTest$0(SocketPermissionTest.java:89)
      ... 31 more
      config SocketPermissionTest.setupSecurityManager(): success
      test SocketPermissionTest.joinGroupMulticastTest(): success
      config SocketPermissionTest.setupSecurityManager(): success
      test SocketPermissionTest.listenDatagramSocketTest(): success
      config SocketPermissionTest.setupSecurityManager(): success
      test SocketPermissionTest.listenMulticastSocketTest(): success
      config SocketPermissionTest.setupSecurityManager(): success
      test SocketPermissionTest.listenServerSocketTest(): success
      config SocketPermissionTest.setupSecurityManager(): success
      test SocketPermissionTest.sendDatagramPacketTest(): success

      ===============================================
      java/net/SocketPermission/SocketPermissionTest.java
      Total tests run: 8, Failures: 1, Skips: 0
      ===============================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                chegar Chris Hegarty
                Reporter:
                xiaofeya Xiaofeng Yang
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: