Skip to content

Commit

Permalink
Remove method Netty4HttpPipeliningHandlerTests#shutdownExecutorService
Browse files Browse the repository at this point in the history
  • Loading branch information
iverase committed Sep 26, 2023
1 parent e3f1c15 commit 615678d
Showing 1 changed file with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,7 @@ public class Netty4HttpPipeliningHandlerTests extends ESTestCase {
@After
public void tearDown() throws Exception {
waitingRequests.keySet().forEach(this::finishRequest);
shutdownExecutorService();
super.tearDown();
}

private CountDownLatch finishRequest(String url) {
waitingRequests.get(url).countDown();
return finishingRequests.get(url);
}

private void shutdownExecutorService() throws InterruptedException {
// shutdown the Executor Service
if (handlerService.isShutdown() == false) {
handlerService.shutdown();
handlerService.awaitTermination(10, TimeUnit.SECONDS);
Expand All @@ -88,6 +79,12 @@ private void shutdownExecutorService() throws InterruptedException {
eventLoopService.shutdown();
eventLoopService.awaitTermination(10, TimeUnit.SECONDS);
}
super.tearDown();
}

private CountDownLatch finishRequest(String url) {
waitingRequests.get(url).countDown();
return finishingRequests.get(url);
}

public void testThatPipeliningWorksWithFastSerializedRequests() throws InterruptedException {
Expand Down

0 comments on commit 615678d

Please sign in to comment.