db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r886857 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseTestCase.java
Date Thu, 03 Dec 2009 17:28:21 GMT
Author: myrnavl
Date: Thu Dec  3 17:27:59 2009
New Revision: 886857

URL: http://svn.apache.org/viewvc?rev=886857&view=rev
Log:
DERBY-3829; convert derbynet/sysinfo and derbynet/sysinfo_with_properties to JUnit; addressing
some final comments

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=886857&r1=886856&r2=886857&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 Dec
 3 17:27:59 2009
@@ -470,7 +470,7 @@
 	 * @throws InterruptedException
 	 * @throws IOException
 	 */
-	public void assertExecJavaCmdAsExpected(String[] expectedString,
+	public static void assertExecJavaCmdAsExpected(String[] expectedString,
 	        String[] cmd, int expectedExitValue) throws InterruptedException,
 	        IOException {
 
@@ -499,7 +499,7 @@
 	 * @return the process that was started
 	 * @throws IOException
 	 */
-	public Process execJavaCmd(String[] cmd) throws IOException {
+	public static Process execJavaCmd(String[] cmd) throws IOException {
 	    int totalSize = 3 + cmd.length;
 	    String[] tcmd = new String[totalSize];
 	    tcmd[0] = getJavaExecutableName();
@@ -521,11 +521,7 @@
 	            }
 	        });
 	    } catch (PrivilegedActionException pe) {
-	        Exception e = pe.getException();
-	        if (e instanceof IOException)
-	            throw (IOException) e;
-	        else
-	            throw (SecurityException) e;
+            throw (IOException) pe.getException();
 	    }
 	    return pr;
 	}
@@ -552,7 +548,7 @@
     * @return output of the process
     * @throws InterruptedException
     */
-   public String readProcessOutput(Process pr) throws InterruptedException {
+   public static String readProcessOutput(Process pr) throws InterruptedException {
 		InputStream is = pr.getInputStream();
 		if (is == null) {
 			fail("Unexpectedly receiving no text from the process");



Mime
View raw message