Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8246132: AsynchronousSocketChannelNAPITest failing with a NotYetConne…
…ctedException

Fix for intermitant failure with AsynchronousSocketChannelNAPITest that sometimes fails with a NotYetConnectedException while trying to read data after connecting

Reviewed-by: alanb, dfuchs
  • Loading branch information
pconcannon committed Jun 5, 2020
1 parent 13d3023 commit 97fc959e35636e0d06f4ec6f9abbb781f03dfdc3
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/jdk/jdk/net/ExtendedSocketOption/AsynchronousSocketChannelNAPITest.java
@@ -101,9 +101,9 @@ public void testSocketChannel() throws Exception {
ss.bind(new InetSocketAddress(hostAddr, 0));

try (var c = AsynchronousSocketChannel.open()) {
c.connect(ss.getLocalAddress());
c.connect(ss.getLocalAddress()).get();

try(var s = ss.accept().get()) {
try (var s = ss.accept().get()) {
assertEquals((int) s.getOption(SO_INCOMING_NAPI_ID), 0);

for (int i = 0; i < 10; i++) {

0 comments on commit 97fc959

Please sign in to comment.