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.116 by jsr166, Wed Mar 22 20:19:55 2017 UTC vs.
Revision 1.117 by jsr166, Sat Mar 25 21:41:10 2017 UTC

# Line 90 | Line 90 | public class ThreadPoolExecutorTest exte
90              final Runnable task = new CheckedRunnable() {
91                  public void realRun() { done.countDown(); }};
92              p.execute(task);
93 <            assertTrue(done.await(LONG_DELAY_MS, MILLISECONDS));
93 >            await(done);
94          }
95      }
96  
# Line 184 | Line 184 | public class ThreadPoolExecutorTest exte
184                  public void realRun() throws InterruptedException {
185                      threadStarted.countDown();
186                      assertEquals(0, p.getCompletedTaskCount());
187 <                    threadProceed.await();
187 >                    await(threadProceed);
188                      threadDone.countDown();
189                  }});
190              await(threadStarted);
191              assertEquals(0, p.getCompletedTaskCount());
192              threadProceed.countDown();
193 <            threadDone.await();
193 >            await(threadDone);
194              long startTime = System.nanoTime();
195              while (p.getCompletedTaskCount() != 1) {
196                  if (millisElapsedSince(startTime) > LONG_DELAY_MS)
# Line 1941 | Line 1941 | public class ThreadPoolExecutorTest exte
1941                      public void realRun() {
1942                          done.countDown();
1943                      }});
1944 <            assertTrue(done.await(LONG_DELAY_MS, MILLISECONDS));
1944 >            await(done);
1945          }
1946      }
1947  
# Line 2034 | Line 2034 | public class ThreadPoolExecutorTest exte
2034                  }
2035              }
2036              // enough time to run all tasks
2037 <            assertTrue(done.await(nTasks * SHORT_DELAY_MS, MILLISECONDS));
2037 >            await(done, nTasks * SHORT_DELAY_MS);
2038          }
2039      }
2040  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines