db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpendle...@apache.org
Subject svn commit: r1128942 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java
Date Sun, 29 May 2011 19:53:41 GMT
Author: bpendleton
Date: Sun May 29 19:53:41 2011
New Revision: 1128942

URL: http://svn.apache.org/viewvc?rev=1128942&view=rev
Log:
DERBY-5251: make ErrorCodeTest pass in non-English locale

This change was contributed by Houx Zhang (houx.zhang at gmail.com)

This change modifies ErrorCodeTest to use LocaleTestSetup to
force the test to run in English locale. Since the point of
this test is to test the behavior of syscs_diag.error_messages,
by comparing the contents of the messages to hard-coded English
strings, the test needs to run in the matching locale.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java?rev=1128942&r1=1128941&r2=1128942&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java
Sun May 29 19:53:41 2011
@@ -25,10 +25,13 @@ import junit.framework.Test;
 import junit.framework.TestSuite;
 
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
+import org.apache.derbyTesting.junit.LocaleTestSetup;
 import org.apache.derbyTesting.junit.TestConfiguration;
 
 import java.sql.ResultSet;
 import java.sql.Statement;
+import java.util.Locale;
+
 import org.apache.derbyTesting.junit.JDBC;
 
 public final class ErrorCodeTest extends BaseJDBCTestCase {
@@ -44,8 +47,10 @@ public final class ErrorCodeTest extends
     public static Test suite()
     {
         TestSuite suite = new TestSuite("errorcode Test");
+        
         suite.addTest(TestConfiguration.embeddedSuite(ErrorCodeTest.class));
-        return suite;
+        
+        return new LocaleTestSetup(suite, Locale.ENGLISH);
     }
 
     public void test_errorcode() throws Exception



Mime
View raw message