ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/ExecutorsTest.java
(Generate patch)

Comparing jsr166/src/test/tck/ExecutorsTest.java (file contents):
Revision 1.51 by jsr166, Mon Dec 16 22:55:54 2019 UTC vs.
Revision 1.52 by dl, Sat Feb 1 16:45:50 2020 UTC

# Line 279 | Line 279 | public class ExecutorsTest extends JSR16
279              Executors.newScheduledThreadPool(2),
280          };
281  
282 <        final Runnable sleeper = new CheckedInterruptedRunnable() {
282 >        final Runnable sleeper = new CheckedRunnable() {
283              public void realRun() throws InterruptedException {
284 <                delay(LONG_DELAY_MS);
284 >                try {
285 >                    delay(LONG_DELAY_MS);
286 >                } catch(InterruptedException OK) {
287 >                }
288              }};
289  
290          List<Thread> threads = new ArrayList<>();
# Line 295 | Line 298 | public class ExecutorsTest extends JSR16
298          for (Thread thread : threads)
299              awaitTermination(thread);
300          for (ExecutorService executor : executors)
301 +            executor.shutdownNow(); // assumes shutdownNow interrupts threads
302 +        for (ExecutorService executor : executors)
303              joinPool(executor);
304      }
305  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines