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

Comparing jsr166/src/test/tck/DelayQueueTest.java (file contents):
Revision 1.48 by jsr166, Thu Apr 14 22:55:08 2011 UTC vs.
Revision 1.49 by dl, Fri May 6 11:22:07 2011 UTC

# Line 353 | Line 353 | public class DelayQueueTest extends JSR1
353              }});
354  
355          t.start();
356 <        Thread.sleep(SHORT_DELAY_MS);
356 >        delay(SHORT_DELAY_MS);
357          q.take();
358          t.interrupt();
359          t.join();
# Line 373 | Line 373 | public class DelayQueueTest extends JSR1
373              }});
374  
375          t.start();
376 <        Thread.sleep(SMALL_DELAY_MS);
376 >        delay(SMALL_DELAY_MS);
377          t.interrupt();
378          t.join();
379      }
# Line 406 | Line 406 | public class DelayQueueTest extends JSR1
406                  assertTrue(millisElapsedSince(t0) >= SHORT_DELAY_MS);
407              }});
408          threadStarted.await();
409 <        Thread.sleep(SHORT_DELAY_MS);
409 >        delay(SHORT_DELAY_MS);
410          assertTrue(t.isAlive());
411          t.interrupt();
412          awaitTermination(t, MEDIUM_DELAY_MS);
# Line 430 | Line 430 | public class DelayQueueTest extends JSR1
430              }});
431  
432          t.start();
433 <        Thread.sleep(SHORT_DELAY_MS);
433 >        delay(SHORT_DELAY_MS);
434          t.interrupt();
435          t.join();
436      }
# Line 487 | Line 487 | public class DelayQueueTest extends JSR1
487              }});
488  
489          t.start();
490 <        Thread.sleep(SHORT_DELAY_MS);
490 >        delay(SHORT_DELAY_MS);
491          t.interrupt();
492          t.join();
493      }
# Line 773 | Line 773 | public class DelayQueueTest extends JSR1
773  
774          executor.execute(new CheckedRunnable() {
775              public void realRun() throws InterruptedException {
776 <                Thread.sleep(SHORT_DELAY_MS);
776 >                delay(SHORT_DELAY_MS);
777                  q.put(new PDelay(1));
778              }});
779  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines