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

Comparing jsr166/src/test/tck/ArrayBlockingQueueTest.java (file contents):
Revision 1.42 by jsr166, Sun Nov 28 08:43:53 2010 UTC vs.
Revision 1.45 by dl, Fri May 6 11:22:07 2011 UTC

# Line 1 | Line 1
1   /*
2   * Written by Doug Lea with assistance from members of JCP JSR-166
3   * Expert Group and released to the public domain, as explained at
4 < * http://creativecommons.org/licenses/publicdomain
4 > * http://creativecommons.org/publicdomain/zero/1.0/
5   * Other contributors include Andrew Wright, Jeffrey Hayes,
6   * Pat Fisher, Mike Judd.
7   */
# Line 294 | Line 294 | public class ArrayBlockingQueueTest exte
294              q.put(null);
295              shouldThrow();
296          } catch (NullPointerException success) {}
297 <     }
297 >    }
298  
299      /**
300       * all elements successfully put are contained
# Line 327 | Line 327 | public class ArrayBlockingQueueTest exte
327              }});
328  
329          t.start();
330 <        Thread.sleep(SHORT_DELAY_MS);
330 >        delay(SHORT_DELAY_MS);
331          t.interrupt();
332          t.join();
333          assertEquals(SIZE, q.size());
# Line 351 | Line 351 | public class ArrayBlockingQueueTest exte
351              }});
352  
353          t.start();
354 <        Thread.sleep(SHORT_DELAY_MS);
354 >        delay(SHORT_DELAY_MS);
355          assertEquals(q.remainingCapacity(), 0);
356          assertEquals(0, q.take());
357 <        Thread.sleep(SHORT_DELAY_MS);
357 >        delay(SHORT_DELAY_MS);
358          t.interrupt();
359          t.join();
360          assertEquals(q.remainingCapacity(), 0);
# Line 377 | Line 377 | public class ArrayBlockingQueueTest exte
377              }});
378  
379          t.start();
380 <        Thread.sleep(SHORT_DELAY_MS);
380 >        delay(SHORT_DELAY_MS);
381          t.interrupt();
382          t.join();
383      }
# Line 409 | Line 409 | public class ArrayBlockingQueueTest exte
409              }});
410  
411          t.start();
412 <        Thread.sleep(SHORT_DELAY_MS);
412 >        delay(SHORT_DELAY_MS);
413          t.interrupt();
414          t.join();
415      }
# Line 752 | Line 752 | public class ArrayBlockingQueueTest exte
752  
753          executor.execute(new CheckedRunnable() {
754              public void realRun() throws InterruptedException {
755 <                Thread.sleep(SMALL_DELAY_MS);
755 >                delay(SMALL_DELAY_MS);
756                  assertSame(one, q.take());
757              }});
758  
# Line 774 | Line 774 | public class ArrayBlockingQueueTest exte
774  
775          executor.execute(new CheckedRunnable() {
776              public void realRun() throws InterruptedException {
777 <                Thread.sleep(SMALL_DELAY_MS);
777 >                delay(SMALL_DELAY_MS);
778                  q.put(one);
779              }});
780  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines