db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r1350258 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ConnectWrongSubprotocolTest.java
Date Thu, 14 Jun 2012 14:22:24 GMT
Author: kmarsden
Date: Thu Jun 14 14:22:23 2012
New Revision: 1350258

URL: http://svn.apache.org/viewvc?rev=1350258&view=rev
Log:
DERBY-5424 On z/OS testConnectWrongSubprotocolWithSystemProperty(org.apache.derbyTesting.functionTests.tests.tools.ConnectWrongSubprotocolTest)junit.framework.AssertionFailedError

Fix test encoding issue


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

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ConnectWrongSubprotocolTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ConnectWrongSubprotocolTest.java?rev=1350258&r1=1350257&r2=1350258&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ConnectWrongSubprotocolTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ConnectWrongSubprotocolTest.java
Thu Jun 14 14:22:23 2012
@@ -86,7 +86,7 @@ public class ConnectWrongSubprotocolTest
     private String runIjScript(String ijScript, boolean useSystemProperties) 
             throws UnsupportedEncodingException, SQLException {
         ByteArrayInputStream bais = 
-        		new ByteArrayInputStream(ijScript.getBytes());
+        		new ByteArrayInputStream(ijScript.getBytes("US-ASCII"));
         ByteArrayOutputStream baos = new ByteArrayOutputStream(10 * 1024);
         Connection conn = getConnection();
         
@@ -101,6 +101,6 @@ public class ConnectWrongSubprotocolTest
         if (!conn.isClosed() && !conn.getAutoCommit())
             conn.commit();
 
-        return new String(baos.toByteArray());
+        return new String(baos.toByteArray(), "US-ASCII");
     }
 }



Mime
View raw message