db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r593643 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/SysinfoCPCheckTest.java
Date Fri, 09 Nov 2007 20:36:09 GMT
Author: myrnavl
Date: Fri Nov  9 12:36:08 2007
New Revision: 593643

URL: http://svn.apache.org/viewvc?rev=593643&view=rev
Log:
DERBY-2903 ; addressing some review comments

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/SysinfoCPCheckTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/SysinfoCPCheckTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/SysinfoCPCheckTest.java?rev=593643&r1=593642&r2=593643&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/SysinfoCPCheckTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/SysinfoCPCheckTest.java
Fri Nov  9 12:36:08 2007
@@ -43,10 +43,6 @@
         super(name); 
     }
 
-    final String outputEncoding = "US-ASCII";
-
-    private ByteArrayOutputStream rawBytes;
-
     private static boolean isClient = true;
     private static boolean isServer = true;
     
@@ -116,9 +112,11 @@
         int tst=0;
         for (tst=0; tst<tstargs.length ; tst++)
         {
+            ByteArrayOutputStream rawBytes = getOutputStream();
+
             // First obtain the output for the sysinfo command
             try {
-                PrintStream testOut = new PrintStream(getOutputStream(),
+                PrintStream testOut = new PrintStream(rawBytes,
                     false, outputEncoding);
                 setSystemOut(testOut);
             } catch (UnsupportedEncodingException uee) {
@@ -241,12 +239,7 @@
         );       
     }
 
-    OutputStream getOutputStream() {
-        return rawBytes = new ByteArrayOutputStream(20 * 1024);
-    }
-
-    protected void tearDown() throws Exception {
-        rawBytes = null;
-        super.tearDown();
+    ByteArrayOutputStream getOutputStream() {
+        return new ByteArrayOutputStream(20 * 1024);
     }
 }



Mime
View raw message