db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r687708 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseTestCase.java
Date Thu, 21 Aug 2008 10:55:28 GMT
Author: kahatlen
Date: Thu Aug 21 03:55:27 2008
New Revision: 687708

URL: http://svn.apache.org/viewvc?rev=687708&view=rev
Log:
Improved error reporting in BaseTestCase.assertExecJavaCmdAsExpected()
to help debugging a problem in NetworkServerControlApiTest.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseTestCase.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseTestCase.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseTestCase.java?rev=687708&r1=687707&r2=687708&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseTestCase.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseTestCase.java Thu Aug
21 03:55:27 2008
@@ -497,7 +497,7 @@
                output = output + new String(ca).trim();
            }
        } catch (Exception e) {
-           fail("Exception accessing inputstream from javacommand");
+           fail("Exception accessing inputstream from javacommand", e);
        }
        
        // wait until the process exits
@@ -508,7 +508,10 @@
        {
            for (int i=0 ; i<expectedString.length ; i++)
            {
-               assertFalse(output.indexOf(expectedString[i]) < 0);
+               if (output.indexOf(expectedString[i]) == -1) {
+                   fail("Didn't find expected string: " + expectedString[i] +
+                        "\nFull output from the command:\n" + output);
+               }
            }
        }
    }



Mime
View raw message