diff options
author | Jesse Wilson <jessewilson@google.com> | 2011-05-26 14:33:15 -0700 |
---|---|---|
committer | Jesse Wilson <jessewilson@google.com> | 2011-05-26 14:33:15 -0700 |
commit | 6e14ff9ae9297ce1496cd5ec2580c380e3bb7481 (patch) | |
tree | e03bd4ed49c5e9c4b1699063283a5bfb512ba451 /luni | |
parent | 0eefc54c2ae7a461cb28a8f117b515071df19f1e (diff) | |
download | apache-harmony-6e14ff9ae9297ce1496cd5ec2580c380e3bb7481.tar.gz |
Remove a bogus assumption about thread timing.
Change-Id: I0950ae47cca1b009f6c24110112f66355ad111ea
http://b/4491484
Diffstat (limited to 'luni')
-rw-r--r-- | luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedInputStreamTest.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedInputStreamTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedInputStreamTest.java index 6295de5..a3b8de2 100644 --- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedInputStreamTest.java +++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedInputStreamTest.java @@ -85,7 +85,6 @@ public class PipedInputStreamTest extends junit.framework.TestCase { pis.connect(pos); t = new Thread(pw = new PWriter(pos, 1000)); t.start(); - assertTrue(t.isAlive()); while (true) { pis.read(); t.interrupt(); @@ -400,8 +399,8 @@ public class PipedInputStreamTest extends junit.framework.TestCase { } super.tearDown(); } - - + + /** * @tests java.io.PipedInputStream#PipedInputStream(java.io.PipedOutputStream, * int) @@ -414,14 +413,14 @@ public class PipedInputStreamTest extends junit.framework.TestCase { new PipedOutputStream(), 100); int bufferLength = mpis.bufferLength(); assertEquals(100, bufferLength); - + try { pis = new PipedInputStream(null, -1); fail("Should throw IllegalArgumentException"); //$NON-NLS-1$ } catch (IllegalArgumentException e) { // expected } - + try { pis = new PipedInputStream(null, 0); fail("Should throw IllegalArgumentException"); //$NON-NLS-1$ @@ -446,7 +445,7 @@ public class PipedInputStreamTest extends junit.framework.TestCase { } catch (IllegalArgumentException e) { // expected } - + try { pis = new PipedInputStream(0); fail("Should throw IllegalArgumentException"); //$NON-NLS-1$ @@ -454,7 +453,7 @@ public class PipedInputStreamTest extends junit.framework.TestCase { // expected } } - + static class MockPipedInputStream extends PipedInputStream { public MockPipedInputStream(java.io.PipedOutputStream src, |