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

Comparing jsr166/src/test/tck/ThreadPoolExecutorTest.java (file contents):
Revision 1.107 by jsr166, Tue Oct 6 05:22:25 2015 UTC vs.
Revision 1.108 by jsr166, Tue Oct 6 05:30:44 2015 UTC

# Line 115 | Line 115 | public class ThreadPoolExecutorTest exte
115                      assertEquals(1, p.getActiveCount());
116                      await(done);
117                  }});
118 <            assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
118 >            await(threadStarted);
119              assertEquals(1, p.getActiveCount());
120              done.countDown();
121          }
# Line 387 | Line 387 | public class ThreadPoolExecutorTest exte
387                      assertEquals(1, p.getPoolSize());
388                      await(done);
389                  }});
390 <            assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
390 >            await(threadStarted);
391              assertEquals(1, p.getPoolSize());
392          }
393      }
# Line 411 | Line 411 | public class ThreadPoolExecutorTest exte
411                      threadStarted.countDown();
412                      await(done);
413                  }});
414 <            assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
414 >            await(threadStarted);
415              assertEquals(1, p.getTaskCount());
416              assertEquals(0, p.getCompletedTaskCount());
417              for (int i = 0; i < TASKS; i++) {
# Line 495 | Line 495 | public class ThreadPoolExecutorTest exte
495                      threadStarted.countDown();
496                      await(done);
497                  }});
498 <            assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
498 >            await(threadStarted);
499              assertFalse(p.isTerminating());
500              done.countDown();
501              try { p.shutdown(); } catch (SecurityException ok) { return; }
# Line 523 | Line 523 | public class ThreadPoolExecutorTest exte
523                      threadStarted.countDown();
524                      await(done);
525                  }});
526 <            assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
526 >            await(threadStarted);
527              assertFalse(p.isTerminating());
528              done.countDown();
529              try { p.shutdown(); } catch (SecurityException ok) { return; }
# Line 557 | Line 557 | public class ThreadPoolExecutorTest exte
557                  tasks[i] = new FutureTask(task);
558                  p.execute(tasks[i]);
559              }
560 <            assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
560 >            await(threadStarted);
561              assertSame(q, p.getQueue());
562              assertFalse(q.contains(tasks[0]));
563              assertTrue(q.contains(tasks[tasks.length - 1]));
# Line 587 | Line 587 | public class ThreadPoolExecutorTest exte
587                      }};
588                  p.execute(tasks[i]);
589              }
590 <            assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
590 >            await(threadStarted);
591              assertFalse(p.remove(tasks[0]));
592              assertTrue(q.contains(tasks[4]));
593              assertTrue(q.contains(tasks[3]));
# Line 624 | Line 624 | public class ThreadPoolExecutorTest exte
624                  tasks[i] = new FutureTask(task);
625                  p.execute(tasks[i]);
626              }
627 <            assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
627 >            await(threadStarted);
628              assertEquals(tasks.length, p.getTaskCount());
629              assertEquals(tasks.length - 1, q.size());
630              assertEquals(1L, p.getActiveCount());
# Line 2044 | Line 2044 | public class ThreadPoolExecutorTest exte
2044                  }};
2045                  futures.add(e.submit(r));
2046              }
2047 <            assertTrue(blockerStarted.await(LONG_DELAY_MS, MILLISECONDS));
2047 >            await(blockerStarted);
2048              for (Future<?> future : futures) future.cancel(false);
2049              for (Future<?> future : futures) {
2050                  try {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines