Skip to content

Commit

Permalink
use after close() is no longer supported
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Oct 18, 2023
1 parent 03877bb commit 4e96c82
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/test/java/org/htmlunit/WebClient5Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

0 comments on commit 4e96c82

Please sign in to comment.