--- jsr166/src/test/tck/LinkedBlockingQueueTest.java 2011/03/15 19:47:06 1.40 +++ jsr166/src/test/tck/LinkedBlockingQueueTest.java 2011/05/06 16:43:45 1.42 @@ -277,13 +277,13 @@ public class LinkedBlockingQueueTest ext /** * put(null) throws NPE */ - public void testPutNull() throws InterruptedException { + public void testPutNull() throws InterruptedException { try { LinkedBlockingQueue q = new LinkedBlockingQueue(SIZE); q.put(null); shouldThrow(); } catch (NullPointerException success) {} - } + } /** * all elements successfully put are contained @@ -316,7 +316,7 @@ public class LinkedBlockingQueueTest ext }}); t.start(); - Thread.sleep(SHORT_DELAY_MS); + delay(SHORT_DELAY_MS); t.interrupt(); t.join(); assertEquals(SIZE, q.size()); @@ -340,10 +340,10 @@ public class LinkedBlockingQueueTest ext }}); 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); @@ -366,7 +366,7 @@ public class LinkedBlockingQueueTest ext }}); t.start(); - Thread.sleep(SMALL_DELAY_MS); + delay(SMALL_DELAY_MS); t.interrupt(); t.join(); } @@ -398,7 +398,7 @@ public class LinkedBlockingQueueTest ext }}); t.start(); - Thread.sleep(SHORT_DELAY_MS); + delay(SHORT_DELAY_MS); t.interrupt(); t.join(); } @@ -758,7 +758,7 @@ public class LinkedBlockingQueueTest ext executor.execute(new CheckedRunnable() { public void realRun() throws InterruptedException { - Thread.sleep(SMALL_DELAY_MS); + delay(SMALL_DELAY_MS); assertSame(one, q.take()); }}); @@ -780,7 +780,7 @@ public class LinkedBlockingQueueTest ext executor.execute(new CheckedRunnable() { public void realRun() throws InterruptedException { - Thread.sleep(SMALL_DELAY_MS); + delay(SMALL_DELAY_MS); q.put(one); }});