Skip to content
Prev Previous commit
Next Next commit
Shutdown executor after each test of AbortPolicyWithReportTest
  • Loading branch information
zrlw committed Feb 26, 2025
commit 0a96713d9210713e613c928cf0a90fc5ca7d2428
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ protected void jstack(FileOutputStream jStackStream) {

await().until(() -> AbortPolicyWithReport.guard.availablePermits() == 1);
Assertions.assertNotNull(fileOutputStream.get());
executorService.shutdown();
}

@Test
Expand Down Expand Up @@ -128,6 +129,7 @@ protected void jstack(FileOutputStream jStackStream) {
Assertions.assertEquals(
runTimes, finishedCount.get() + failureCount.get(), "all the test thread should be run completely");
Assertions.assertEquals(1, jStackCount.get(), "'jstack' should be called only once in 10 minutes");
threadPoolExecutor.shutdown();
}

@Test
Expand Down