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.40 by jsr166, Tue Mar 15 19:47:07 2011 UTC vs.
Revision 1.41 by dl, Fri May 6 11:22:08 2011 UTC

# Line 154 | Line 154 | public class ThreadPoolExecutorTest exte
154              assertEquals(0, p.getCompletedTaskCount());
155              threadProceed.countDown();
156              threadDone.await();
157 <            Thread.sleep(SHORT_DELAY_MS);
157 >            delay(SHORT_DELAY_MS);
158              assertEquals(1, p.getCompletedTaskCount());
159          } finally {
160              joinPool(p);
# Line 1345 | Line 1345 | public class ThreadPoolExecutorTest exte
1345          try {
1346              TrackedNoOpRunnable r = new TrackedNoOpRunnable();
1347              p.execute(r);
1348 <            Thread.sleep(SHORT_DELAY_MS);
1348 >            delay(SHORT_DELAY_MS);
1349              assertTrue(r.done);
1350              assertTrue(p.beforeCalled);
1351              assertTrue(p.afterCalled);
# Line 1919 | Line 1919 | public class ThreadPoolExecutorTest exte
1919              for (int i = 0; i < (MEDIUM_DELAY_MS/10); i++) {
1920                  if (p.getPoolSize() == 0)
1921                      break;
1922 <                Thread.sleep(10);
1922 >                delay(10);
1923              }
1924              assertEquals(0, p.getPoolSize());
1925          } finally {
# Line 1943 | Line 1943 | public class ThreadPoolExecutorTest exte
1943                      threadStarted.countDown();
1944                      assertTrue(p.getPoolSize() >= 1);
1945                  }});
1946 <            Thread.sleep(SMALL_DELAY_MS);
1946 >            delay(SMALL_DELAY_MS);
1947              assertTrue(p.getPoolSize() >= 1);
1948          } finally {
1949              joinPool(p);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines