File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
core/src/test/java/dev/failsafe/issues Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 88
99import java .time .Duration ;
1010import java .util .concurrent .ExecutionException ;
11+ import java .util .concurrent .ExecutorService ;
12+ import java .util .concurrent .Executors ;
1113import java .util .concurrent .atomic .AtomicBoolean ;
1214
1315import static org .testng .Assert .assertTrue ;
1416
15- @ Test ( enabled = false )
17+ @ Test
1618public class Issue231Test {
1719 /**
18- * Timeout, even with interruption, should wait for the execution to complete.
20+ * Timeout, even with interruption, should wait for the execution to complete before completing the future .
1921 */
2022 public void shouldWaitForExecutionCompletion () {
23+ // Use a separate executorService for this test in case the common pool is full
24+ ExecutorService executorService = Executors .newFixedThreadPool (2 );
2125 Timeout <Object > timeout = Timeout .builder (Duration .ofMillis (100 )).withInterrupt ().build ();
2226 AtomicBoolean executionCompleted = new AtomicBoolean ();
23- Asserts .assertThrows (() -> Failsafe .with (timeout ).runAsync (() -> {
27+ Asserts .assertThrows (() -> Failsafe .with (timeout ).with ( executorService ). runAsync (() -> {
2428 try {
2529 Thread .sleep (1000 );
2630 } catch (InterruptedException ignore ) {
Original file line number Diff line number Diff line change 168168 <plugin >
169169 <groupId >org.jacoco</groupId >
170170 <artifactId >jacoco-maven-plugin</artifactId >
171- <version >0.8.6 </version >
171+ <version >0.8.7 </version >
172172 <executions >
173173 <execution >
174174 <id >prepare-agent</id >
You can’t perform that action at this time.
0 commit comments