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

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

# Line 172 | Line 172 | public class SynchronousQueueTest extend
172              }});
173  
174          t.start();
175 <        Thread.sleep(SHORT_DELAY_MS);
175 >        delay(SHORT_DELAY_MS);
176          t.interrupt();
177          t.join();
178      }
# Line 196 | Line 196 | public class SynchronousQueueTest extend
196              }});
197  
198          t.start();
199 <        Thread.sleep(SHORT_DELAY_MS);
199 >        delay(SHORT_DELAY_MS);
200          assertEquals(0, q.take());
201 <        Thread.sleep(SHORT_DELAY_MS);
201 >        delay(SHORT_DELAY_MS);
202          t.interrupt();
203          t.join();
204      }
# Line 253 | Line 253 | public class SynchronousQueueTest extend
253              }});
254  
255          t.start();
256 <        Thread.sleep(SHORT_DELAY_MS);
256 >        delay(SHORT_DELAY_MS);
257          t.interrupt();
258          t.join();
259      }
# Line 277 | Line 277 | public class SynchronousQueueTest extend
277              }});
278  
279          t.start();
280 <        Thread.sleep(SHORT_DELAY_MS);
280 >        delay(SHORT_DELAY_MS);
281          assertEquals(0, q.take());
282 <        Thread.sleep(SHORT_DELAY_MS);
282 >        delay(SHORT_DELAY_MS);
283          t.interrupt();
284          t.join();
285      }
# Line 295 | Line 295 | public class SynchronousQueueTest extend
295              }});
296  
297          t.start();
298 <        Thread.sleep(SHORT_DELAY_MS);
298 >        delay(SHORT_DELAY_MS);
299          t.interrupt();
300          t.join();
301      }
# Line 346 | Line 346 | public class SynchronousQueueTest extend
346              }});
347  
348          threadStarted.await();
349 <        Thread.sleep(SHORT_DELAY_MS);
349 >        delay(SHORT_DELAY_MS);
350          t.interrupt();
351          awaitTermination(t, MEDIUM_DELAY_MS);
352      }
# Line 573 | Line 573 | public class SynchronousQueueTest extend
573  
574          executor.execute(new CheckedRunnable() {
575              public void realRun() throws InterruptedException {
576 <                Thread.sleep(SMALL_DELAY_MS);
576 >                delay(SMALL_DELAY_MS);
577                  assertSame(one, q.take());
578              }});
579  
# Line 595 | Line 595 | public class SynchronousQueueTest extend
595  
596          executor.execute(new CheckedRunnable() {
597              public void realRun() throws InterruptedException {
598 <                Thread.sleep(SHORT_DELAY_MS);
598 >                delay(SHORT_DELAY_MS);
599                  q.put(one);
600              }});
601  
# Line 665 | Line 665 | public class SynchronousQueueTest extend
665  
666          t.start();
667          ArrayList l = new ArrayList();
668 <        Thread.sleep(SHORT_DELAY_MS);
668 >        delay(SHORT_DELAY_MS);
669          q.drainTo(l);
670          assertTrue(l.size() <= 1);
671          if (l.size() > 0)
# Line 714 | Line 714 | public class SynchronousQueueTest extend
714          t1.start();
715          t2.start();
716          ArrayList l = new ArrayList();
717 <        Thread.sleep(SHORT_DELAY_MS);
717 >        delay(SHORT_DELAY_MS);
718          q.drainTo(l, 1);
719          assertEquals(1, l.size());
720          q.drainTo(l, 1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines