diff options
author | Przemyslaw Szczepaniak <pszczepaniak@google.com> | 2016-03-15 09:42:33 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-03-15 09:42:33 +0000 |
commit | a8a9d448e97004dcd25c9ccb128e09bcb7690f6a (patch) | |
tree | 214d4e0cdccf19471194d03dd3172933336910f1 /jsr166-tests/src/test/java/jsr166/BlockingQueueTest.java | |
parent | 37f9fec54f50b2e0898ee2b61d058c4de879e38b (diff) | |
parent | ed4f365789d43b1961657195df223a19bf4ef20f (diff) |
Merge "Revert "JSR-166 update""
Diffstat (limited to 'jsr166-tests/src/test/java/jsr166/BlockingQueueTest.java')
-rw-r--r-- | jsr166-tests/src/test/java/jsr166/BlockingQueueTest.java | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/jsr166-tests/src/test/java/jsr166/BlockingQueueTest.java b/jsr166-tests/src/test/java/jsr166/BlockingQueueTest.java index 1a188e161d..db0f03dafa 100644 --- a/jsr166-tests/src/test/java/jsr166/BlockingQueueTest.java +++ b/jsr166-tests/src/test/java/jsr166/BlockingQueueTest.java @@ -39,9 +39,9 @@ public abstract class BlockingQueueTest extends JSR166TestCase { // android-note: Explicitly instantiated. // // public Test testSuite() { - // // TODO: filter the returned tests using the configuration - // // information provided by the subclass via protected methods. - // return new TestSuite(this.getClass()); + // // TODO: filter the returned tests using the configuration + // // information provided by the subclass via protected methods. + // return new TestSuite(this.getClass()); // } //---------------------------------------------------------------- @@ -239,8 +239,6 @@ public abstract class BlockingQueueTest extends JSR166TestCase { shouldThrow(); } catch (InterruptedException success) {} assertFalse(Thread.interrupted()); - - assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS); }}); barrier.await(); @@ -354,20 +352,20 @@ public abstract class BlockingQueueTest extends JSR166TestCase { assertEquals((pass == 0), q.contains(elts[i])); assertEquals((pass == 0), q.remove(elts[i])); assertFalse(q.contains(elts[i])); - assertTrue(q.contains(elts[i - 1])); + assertTrue(q.contains(elts[i-1])); if (i < size - 1) - assertTrue(q.contains(elts[i + 1])); + assertTrue(q.contains(elts[i+1])); } } if (size > 0) assertTrue(q.contains(elts[0])); - for (int i = size - 2; i >= 0; i -= 2) { + for (int i = size-2; i >= 0; i -= 2) { assertTrue(q.contains(elts[i])); - assertFalse(q.contains(elts[i + 1])); + assertFalse(q.contains(elts[i+1])); assertTrue(q.remove(elts[i])); assertFalse(q.contains(elts[i])); - assertFalse(q.remove(elts[i + 1])); - assertFalse(q.contains(elts[i + 1])); + assertFalse(q.remove(elts[i+1])); + assertFalse(q.contains(elts[i+1])); } checkEmpty(q); } |