harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r915264 - /harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedInputStreamTest.java
Date Tue, 23 Feb 2010 10:03:35 GMT
Author: hindessm
Date: Tue Feb 23 10:03:34 2010
New Revision: 915264

URL: http://svn.apache.org/viewvc?rev=915264&view=rev
Log:
Make test fail with a more helpful error message.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedInputStreamTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedInputStreamTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedInputStreamTest.java?rev=915264&r1=915263&r2=915264&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedInputStreamTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedInputStreamTest.java
Tue Feb 23 10:03:34 2010
@@ -77,7 +77,7 @@
     /**
      * @test java.io.PipedInputStream#read()
      */
-    public void test_readException() {
+    public void test_readException() throws IOException {
         pis = new PipedInputStream();
         pos = new PipedOutputStream();
 
@@ -91,7 +91,9 @@
                 t.interrupted();
             }
         } catch (IOException e) {
-            assertTrue(e.getMessage().contains("Write end dead"));
+            if (!e.getMessage().contains("Write end dead")) {
+                throw e;
+            }
         } finally {
             try {
                 pis.close();



Mime
View raw message