4 java/net/httpclient/websocket/PendingPing* tests fail intermittently

XMLWordPrintable

      Reproduced in same binaries runs with JDK 11 b10.
      java/net/httpclient/websocket/PendingPingBinaryClose.java
      java/net/httpclient/websocket/PendingPingTextClose.java
      java/net/httpclient/websocket/PendingPongBinaryClose.java
      java/net/httpclient/websocket/PendingPongTextClose.java

      There are major 3 reasons, even in the same tests.
      Most of them shows:
      test PendingPingBinaryClose.pendingPingBinaryClose(false): failure
      java.util.concurrent.ExecutionException: java.io.IOException: Output closed
      at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
      at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2022)
      at PendingPingBinaryClose.lambda$pendingPingBinaryClose$0(PendingPingBinaryClose.java:65)
      at PendingOperations.repeatable(PendingOperations.java:84)
      at PendingPingBinaryClose.pendingPingBinaryClose(PendingPingBinaryClose.java:53)
      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:569)
      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:94)
      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:569)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
      at java.base/java.lang.Thread.run(Thread.java:831)
      Caused by: java.io.IOException: Output closed
      at java.net.http/jdk.internal.net.http.websocket.TransportImpl$SendTask.tryCompleteWrite(TransportImpl.java:609)
      at java.net.http/jdk.internal.net.http.websocket.TransportImpl$SendTask.run(TransportImpl.java:547)
      at java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:147)
      at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:198)
      at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:271)
      at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:224)
      at java.net.http/jdk.internal.net.http.websocket.TransportImpl.sendPing(TransportImpl.java:198)
      at java.net.http/jdk.internal.net.http.websocket.WebSocketImpl.sendPing(WebSocketImpl.java:248)
      at PendingPingBinaryClose.lambda$pendingPingBinaryClose$0(PendingPingBinaryClose.java:63)

      Or

      java.util.concurrent.CompletionException: java.net.ConnectException: Operation timed out
      at java.base/java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:367)
      at java.base/java.util.concurrent.CompletableFuture.completeRelay(CompletableFuture.java:376)
      at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1074)
      at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
      at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088)
      at java.net.http/jdk.internal.net.http.PlainHttpConnection$ConnectEvent.lambda$handle$1(PlainHttpConnection.java:94)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      at java.base/java.lang.Thread.run(Thread.java:831)
      Caused by: java.net.ConnectException: Operation timed out
      at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
      at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:777)
      at java.net.http/jdk.internal.net.http.PlainHttpConnection$ConnectEvent.handle(PlainHttpConnection.java:85)
      at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.handleEvent(HttpClientImpl.java:857)
      at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.lambda$run$3(HttpClientImpl.java:813)
      at java.base/java.util.ArrayList.forEach(ArrayList.java:1395)
      at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.run(HttpClientImpl.java:813)


            Assignee:
            Chris Hegarty
            Reporter:
            Xiaofeng Yang
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: