From 4e96c821594981bfcda3cad87f0eb78b733278a7 Mon Sep 17 00:00:00 2001 From: Ronald Brill Date: Wed, 18 Oct 2023 13:03:21 +0200 Subject: [PATCH] use after close() is no longer supported --- src/test/java/org/htmlunit/WebClient5Test.java | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/test/java/org/htmlunit/WebClient5Test.java b/src/test/java/org/htmlunit/WebClient5Test.java index 8d0c8a27eed..ac5971d6961 100644 --- a/src/test/java/org/htmlunit/WebClient5Test.java +++ b/src/test/java/org/htmlunit/WebClient5Test.java @@ -72,22 +72,4 @@ public Page getPage(final URL url) throws IOException, FailingHttpStatusCodeExce assertEquals(URL_FIRST, calledUrls[0]); } } - - /** - * @throws Exception if the test fails - */ - @Test - public void useAfterCloseShouldNotCreateThreads() throws Exception { - final MockWebConnection connection = getMockWebConnection(); - connection.setDefaultResponse("hello"); - - @SuppressWarnings("resource") - final WebClient webClient = new WebClient(); - webClient.close(); - - // webClient.close() also removes the webConnection - webClient.setWebConnection(connection); - webClient.getPage(URL_FIRST); - assertTrue(getJavaScriptThreads().isEmpty()); - } }