db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r1159511 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.java
Date Fri, 19 Aug 2011 06:16:56 GMT
Author: kmarsden
Date: Fri Aug 19 06:16:56 2011
New Revision: 1159511

URL: http://svn.apache.org/viewvc?rev=1159511&view=rev
Log:
DERBY-4249 Create a simple store recovery test in JUnit

Adjust RuntimeInfoTest to account for the new STDOUT and STDERR tags in readProcessOutput()


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.java?rev=1159511&r1=1159510&r2=1159511&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.java
Fri Aug 19 06:16:56 2011
@@ -59,6 +59,7 @@ public class RuntimeInfoTest extends Bas
 
     private static Locale englishLocale = new Locale("en","US");
 	private static Locale germanLocale = new Locale("de","DE");
+	private static String stdout_err_tags = "<[^<>]*STD.*>";
 	
 	/**
 	 * Constructor
@@ -198,6 +199,7 @@ public class RuntimeInfoTest extends Bas
 	
 	/**
      * Replace memory values in the output string
+     * Removes output tags for STDOUT and STDERR from readProcessOutput
      * Also trims the string to make it easier to compare.
      * 
      * @param s the string to remove lines from
@@ -207,6 +209,7 @@ public class RuntimeInfoTest extends Bas
     	String searchString = ((HashMap)outputs.get(Locale.getDefault())).get("sedMemorySearch").toString();
     	String replaceString = ((HashMap)outputs.get(Locale.getDefault())).get("sedMemoryReplace").toString();
 		s = s.replaceAll(searchString, replaceString);
+		s = s.replaceAll(stdout_err_tags, "");
 		s = s.trim();
 		return s;
     }



Mime
View raw message