--- jsr166/src/test/tck/ArrayBlockingQueueTest.java 2010/11/28 08:43:53 1.42 +++ jsr166/src/test/tck/ArrayBlockingQueueTest.java 2011/05/06 11:22:07 1.45 @@ -1,7 +1,7 @@ /* * Written by Doug Lea with assistance from members of JCP JSR-166 * Expert Group and released to the public domain, as explained at - * http://creativecommons.org/licenses/publicdomain + * http://creativecommons.org/publicdomain/zero/1.0/ * Other contributors include Andrew Wright, Jeffrey Hayes, * Pat Fisher, Mike Judd. */ @@ -294,7 +294,7 @@ public class ArrayBlockingQueueTest exte q.put(null); shouldThrow(); } catch (NullPointerException success) {} - } + } /** * all elements successfully put are contained @@ -327,7 +327,7 @@ public class ArrayBlockingQueueTest exte }}); t.start(); - Thread.sleep(SHORT_DELAY_MS); + delay(SHORT_DELAY_MS); t.interrupt(); t.join(); assertEquals(SIZE, q.size()); @@ -351,10 +351,10 @@ public class ArrayBlockingQueueTest exte }}); t.start(); - Thread.sleep(SHORT_DELAY_MS); + delay(SHORT_DELAY_MS); assertEquals(q.remainingCapacity(), 0); assertEquals(0, q.take()); - Thread.sleep(SHORT_DELAY_MS); + delay(SHORT_DELAY_MS); t.interrupt(); t.join(); assertEquals(q.remainingCapacity(), 0); @@ -377,7 +377,7 @@ public class ArrayBlockingQueueTest exte }}); t.start(); - Thread.sleep(SHORT_DELAY_MS); + delay(SHORT_DELAY_MS); t.interrupt(); t.join(); } @@ -409,7 +409,7 @@ public class ArrayBlockingQueueTest exte }}); t.start(); - Thread.sleep(SHORT_DELAY_MS); + delay(SHORT_DELAY_MS); t.interrupt(); t.join(); } @@ -752,7 +752,7 @@ public class ArrayBlockingQueueTest exte executor.execute(new CheckedRunnable() { public void realRun() throws InterruptedException { - Thread.sleep(SMALL_DELAY_MS); + delay(SMALL_DELAY_MS); assertSame(one, q.take()); }}); @@ -774,7 +774,7 @@ public class ArrayBlockingQueueTest exte executor.execute(new CheckedRunnable() { public void realRun() throws InterruptedException { - Thread.sleep(SMALL_DELAY_MS); + delay(SMALL_DELAY_MS); q.put(one); }});