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

Comparing jsr166/src/test/tck/ScheduledExecutorTest.java (file contents):
Revision 1.69 by jsr166, Tue Oct 6 00:41:47 2015 UTC vs.
Revision 1.70 by jsr166, Tue Oct 6 05:12:16 2015 UTC

# Line 156 | Line 156 | public class ScheduledExecutorTest exten
156                      public void realRun() { done.countDown(); }};
157                  ScheduledFuture h =
158                      p.scheduleAtFixedRate(task, 0, delay, MILLISECONDS);
159 <                done.await();
159 >                await(done);
160                  h.cancel(true);
161                  double normalizedTime =
162                      (double) millisElapsedSince(startTime) / delay;
# Line 182 | Line 182 | public class ScheduledExecutorTest exten
182                      public void realRun() { done.countDown(); }};
183                  ScheduledFuture h =
184                      p.scheduleWithFixedDelay(task, 0, delay, MILLISECONDS);
185 <                done.await();
185 >                await(done);
186                  h.cancel(true);
187                  double normalizedTime =
188                      (double) millisElapsedSince(startTime) / delay;
# Line 315 | Line 315 | public class ScheduledExecutorTest exten
315                  public void realRun() throws InterruptedException {
316                      threadStarted.countDown();
317                      assertEquals(1, p.getActiveCount());
318 <                    done.await();
318 >                    await(done);
319                  }});
320              assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
321              assertEquals(1, p.getActiveCount());
# Line 379 | Line 379 | public class ScheduledExecutorTest exten
379                  p.execute(new CheckedRunnable() {
380                      public void realRun() throws InterruptedException {
381                          threadsStarted.countDown();
382 <                        done.await();
382 >                        await(done);
383                          assertEquals(THREADS, p.getLargestPoolSize());
384                      }});
385              assertTrue(threadsStarted.await(LONG_DELAY_MS, MILLISECONDS));
# Line 403 | Line 403 | public class ScheduledExecutorTest exten
403                  public void realRun() throws InterruptedException {
404                      threadStarted.countDown();
405                      assertEquals(1, p.getPoolSize());
406 <                    done.await();
406 >                    await(done);
407                  }});
408              assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
409              assertEquals(1, p.getPoolSize());
# Line 426 | Line 426 | public class ScheduledExecutorTest exten
426              p.execute(new CheckedRunnable() {
427                  public void realRun() throws InterruptedException {
428                      threadStarted.countDown();
429 <                    done.await();
429 >                    await(done);
430                  }});
431              assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
432              assertEquals(1, p.getTaskCount());
# Line 437 | Line 437 | public class ScheduledExecutorTest exten
437                      public void realRun() throws InterruptedException {
438                          threadStarted.countDown();
439                          assertEquals(1 + TASKS, p.getTaskCount());
440 <                        done.await();
440 >                        await(done);
441                      }});
442              }
443              assertEquals(1 + TASKS, p.getTaskCount());
# Line 512 | Line 512 | public class ScheduledExecutorTest exten
512                  public void realRun() throws InterruptedException {
513                      assertFalse(p.isTerminated());
514                      threadStarted.countDown();
515 <                    done.await();
515 >                    await(done);
516                  }});
517              assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
518              assertFalse(p.isTerminating());
# Line 536 | Line 536 | public class ScheduledExecutorTest exten
536                  public void realRun() throws InterruptedException {
537                      assertFalse(p.isTerminating());
538                      threadStarted.countDown();
539 <                    done.await();
539 >                    await(done);
540                  }});
541              assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
542              assertFalse(p.isTerminating());
# Line 561 | Line 561 | public class ScheduledExecutorTest exten
561                  Runnable r = new CheckedRunnable() {
562                      public void realRun() throws InterruptedException {
563                          threadStarted.countDown();
564 <                        done.await();
564 >                        await(done);
565                      }};
566                  tasks[i] = p.schedule(r, 1, MILLISECONDS);
567              }
# Line 586 | Line 586 | public class ScheduledExecutorTest exten
586                  Runnable r = new CheckedRunnable() {
587                      public void realRun() throws InterruptedException {
588                          threadStarted.countDown();
589 <                        done.await();
589 >                        await(done);
590                      }};
591                  tasks[i] = p.schedule(r, 1, MILLISECONDS);
592              }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines