8304174: Remove delays from httpserver tests

Reviewed-by: jpai, dfuchs
This commit is contained in:
Daniel Jeliński 2023-03-20 09:31:33 +00:00
parent c09f83ec25
commit 450567031e
40 changed files with 88 additions and 111 deletions

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -87,7 +87,7 @@ public class DateFormatterTest {
@AfterTest
public void cleanUp() {
server.stop(1);
server.stop(0);
}
@Test

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -60,7 +60,7 @@ public class HttpServerTest implements HttpHandler {
sendHttpStatusCode(HTTP_STATUS_CODE_OK, ex);
System.out.println("Stopping server ...");
server.stop(1);
server.stop(0);
serverStopped.countDown();
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -89,9 +89,8 @@ public class SelCacheTest extends Test {
test(false, "https", root+"/test1", loopback, httpsport, "largefile.txt", 2730088);
System.out.println("OK");
} finally {
delay();
s1.stop(2);
s2.stop(2);
s1.stop(0);
s2.stop(0);
executor.shutdown();
}
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -35,10 +35,4 @@ public class Test {
logger.setLevel(Level.ALL);
logger.addHandler(h);
}
static void delay () {
try {
Thread.sleep (1000);
} catch (Exception e) {}
}
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -95,11 +95,10 @@ public class Test1 extends Test {
test (false, "https", root+"/test1", httpsport, "largefile.txt", 2730088);
System.out.println ("OK");
} finally {
delay();
if (s1 != null)
s1.stop(2);
s1.stop(0);
if (s2 != null)
s2.stop(2);
s2.stop(0);
if (executor != null)
executor.shutdown ();
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -57,9 +57,8 @@ public class Test10 extends Test {
doClient(port);
System.out.println ("OK");
} finally {
delay();
if (server != null)
server.stop(2);
server.stop(0);
if (exec != null)
exec.shutdown();
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -78,7 +78,7 @@ public class Test11 {
System.out.println ("OK");
} finally {
s.shutdown();
server.stop(2);
server.stop(0);
}
}
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -88,11 +88,10 @@ public class Test12 extends Test {
join (r);
System.out.println ("OK");
} finally {
delay();
if (s1 != null)
s1.stop(2);
s1.stop(0);
if (s2 != null)
s2.stop(2);
s2.stop(0);
if (executor != null)
executor.shutdown ();
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -93,11 +93,10 @@ public class Test13 extends Test {
join (r);
System.out.println ("OK");
} finally {
delay();
if (s1 != null)
s1.stop(2);
s1.stop(0);
if (s2 != null)
s2.stop(2);
s2.stop(0);
if (executor != null)
executor.shutdown ();
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -114,7 +114,7 @@ public class Test14 extends Test {
output = output + (char)x;
}
error = !output.equals (test_output);
server.stop(2);
server.stop(0);
executor.shutdown();
if (error ) {
throw new RuntimeException ("test failed error");

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -79,7 +79,7 @@ public class Test2 extends Test {
while (is.read()!= -1) {
c ++;
}
server.stop(2);
server.stop(0);
executor.shutdown();
if (error ) {
throw new RuntimeException ("test failed error");

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -64,9 +64,8 @@ public class Test3 extends Test {
doClient(port);
System.out.println ("OK");
} finally {
delay();
if (server != null)
server.stop(2);
server.stop(0);
if (exec != null)
exec.shutdown();
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -62,9 +62,8 @@ public class Test4 extends Test {
doClient(port);
System.out.println ("OK");
} finally {
delay();
if (server != null)
server.stop(2);
server.stop(0);
if (exec != null)
exec.shutdown();
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -63,9 +63,8 @@ public class Test5 extends Test {
doClient(port);
System.out.println ("OK");
} finally {
delay ();
if (server != null)
server.stop(2);
server.stop(0);
if (exec != null)
exec.shutdown();
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -81,8 +81,7 @@ public class Test6 extends Test {
if (error) {
throw new RuntimeException ("test failed error");
}
delay();
server.stop(2);
server.stop(0);
executor.shutdown();
System.out.println ("OK");

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -86,8 +86,7 @@ public class Test6a extends Test {
if (error) {
throw new RuntimeException ("test failed error");
}
delay();
server.stop(2);
server.stop(0);
executor.shutdown();
System.out.println ("OK");

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -80,8 +80,7 @@ public class Test7 extends Test {
if (error) {
throw new RuntimeException ("test failed error");
}
delay();
server.stop(2);
server.stop(0);
executor.shutdown();
System.out.println ("OK");

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -89,8 +89,7 @@ public class Test7a extends Test {
if (error) {
throw new RuntimeException ("test failed error");
}
delay();
server.stop(2);
server.stop(0);
executor.shutdown();
System.out.println ("OK");

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -80,8 +80,7 @@ public class Test8 extends Test {
if (error) {
throw new RuntimeException ("test failed error");
}
delay();
server.stop(2);
server.stop(0);
executor.shutdown();
System.out.println ("OK");

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -99,8 +99,7 @@ public class Test8a extends Test {
}
is.close();
} finally {
delay();
if (server != null) server.stop(2);
if (server != null) server.stop(0);
if (executor != null) executor.shutdown();
}
if (error) {

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -100,11 +100,10 @@ public class Test9 extends Test {
System.out.println ("OK");
} finally {
delay();
if (s1 != null)
s1.stop(2);
s1.stop(0);
if (s2 != null)
s2.stop(2);
s2.stop(0);
if (executor != null)
executor.shutdown ();
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -96,9 +96,8 @@ public class Test9a extends Test {
System.out.println ("OK");
} finally {
delay();
if (server != null)
server.stop(2);
server.stop(0);
if (executor != null)
executor.shutdown();
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -105,9 +105,8 @@ public class TestLogging extends Test {
os.close(); is.close(); s.close();
System.out.println ("OK");
} finally {
delay();
if (s1 != null)
s1.stop(2);
s1.stop(0);
if (executor != null)
executor.shutdown();
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -181,7 +181,7 @@ public class BasicAuthenticatorCharset {
connectAndAuth("/test3/defaultCharset.html", 200);
}
testHttpServer.stop(2);
testHttpServer.stop(0);
executor.shutdown();
// should fail once with UNICODE_PW and unsupporting character set

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -94,7 +94,7 @@ public class TestHttpUnicode {
InputStream is = testConnection.getInputStream();
while (is.read() != -1) ;
} finally {
testHttpServer.stop(2);
testHttpServer.stop(0);
}
}
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -66,7 +66,7 @@ public class B6339483 {
c ++;
}
} catch (IOException e) {
server.stop(2);
server.stop(0);
executor.shutdown();
System.out.println ("OK");
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -75,7 +75,7 @@ public class B6341616 {
c ++;
}
} catch (IOException e) {
server.stop(2);
server.stop(0);
executor.shutdown();
System.out.println ("OK");
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -126,7 +126,7 @@ public class B6361557 {
break;
}
}
server.stop (1);
server.stop(0);
selector.close();
executor.shutdown ();

@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -96,7 +96,7 @@ public class B6393710 {
ok = false;
} finally {
s.close();
server.stop(2);
server.stop(0);
}
if (requests != 1) {

@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -130,7 +130,7 @@ public class B6401598 {
} catch (Exception e) {
throw new AssertionError("Unexpected exception: " + e, e);
} finally {
server.stop (1);
server.stop(0);
exec.shutdown();
}
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -85,7 +85,7 @@ public class B6431193 {
.toURL();
InputStream is = url.openConnection(Proxy.NO_PROXY).getInputStream();
read (is);
server.stop (1);
server.stop(0);
if (error) {
throw new RuntimeException ("error in test");
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -77,7 +77,7 @@ public class B6433018 {
os.write(cmd.getBytes());
finished.await(30, TimeUnit.SECONDS);
} finally {
server.stop(2);
server.stop(0);
}
if (finished.getCount() != 0)

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -78,7 +78,7 @@ public class B6526158 {
}
is.close();
} finally {
server.stop(2);
server.stop(0);
executor.shutdown();
}
if (error) {

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -71,7 +71,7 @@ public class B6526913 {
}
is.close();
} finally {
server.stop(2);
server.stop(0);
executor.shutdown();
}
if (error) {

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -72,7 +72,7 @@ public class B6529200 {
/* test will timeout otherwise */
}
} catch (SocketTimeoutException e) {
server.stop (2);
server.stop(0);
executor.shutdown ();
throw new RuntimeException ("Test failed in test1");
}
@ -92,20 +92,20 @@ public class B6529200 {
buf[i++] = (byte)c;
}
} catch (SocketTimeoutException e) {
server.stop (2);
server.stop(0);
executor.shutdown ();
throw new RuntimeException ("Test failed in test2");
}
String ss = new String (buf, "ISO-8859-1");
if (ss.indexOf ("\r\n\r\nhello world") == -1) {
server.stop (2);
server.stop(0);
executor.shutdown ();
throw new RuntimeException ("Test failed in test2: wrong string");
}
System.out.println (ss);
is.close ();
server.stop (2);
server.stop(0);
executor.shutdown();
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -72,7 +72,7 @@ public class B6744329 {
e.printStackTrace();
error = true;
}
server.stop(2);
server.stop(0);
executor.shutdown();
if (error) {
throw new RuntimeException ("Test failed");

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -74,11 +74,11 @@ public class B6886436 {
is.close ();
} catch (IOException e) {
server.stop(2);
server.stop(0);
executor.shutdown();
throw new RuntimeException ("Test failed");
}
server.stop(2);
server.stop(0);
executor.shutdown();
System.out.println ("OK");
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -86,7 +86,7 @@ public class B8211420 {
throw new RuntimeException("Content-length not present or has wrong value");
System.out.println("OK");
} finally {
server.stop(2);
server.stop(0);
executor.shutdown();
}
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -101,7 +101,7 @@ public class AutoCloseableHttpExchange {
connectAndCheck("/test");
}
latch.await();
testHttpServer.stop(2);
testHttpServer.stop(0);
executor.shutdown();
if (exchangeCloseFail.get())

@ -1,6 +1,6 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -71,7 +71,7 @@ public class SimpleHttpServer {
}
public void stop() {
httpServer.stop(2);
httpServer.stop(0);
executor.shutdown();
}