db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o..@apache.org
Subject svn commit: r823555 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_4.java
Date Fri, 09 Oct 2009 14:01:32 GMT
Author: ole
Date: Fri Oct  9 14:01:32 2009
New Revision: 823555

URL: http://svn.apache.org/viewvc?rev=823555&view=rev
Log:
DERBY-3925 - testMetaDataQueryRunInSYScompilationSchema(.....upgradeTests.Changes10_4) fails
on CVM/phoneME
Use 'territory=en' instead of 'territory=no' if the 'no' locale is not available.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_4.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_4.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_4.java?rev=823555&r1=823554&r2=823555&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_4.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_4.java
Fri Oct  9 14:01:32 2009
@@ -24,6 +24,8 @@
 import org.apache.derbyTesting.junit.JDBCDataSource;
 import org.apache.derbyTesting.junit.SupportFilesSetup;
 
+import java.text.Collator;
+import java.util.Locale;
 import java.sql.Connection;
 import java.sql.DatabaseMetaData;
 import java.sql.ParameterMetaData;
@@ -108,8 +110,20 @@
         case PH_CREATE:
             // create the database if it was not already created. Note the
         	// JDBC url attributes.
+            String locale = "en";
+            Locale[] availableLocales = Collator.getAvailableLocales();
+            for (int i = 0; i < availableLocales.length; i++) {
+                if ("no".equals(availableLocales[i].getLanguage())) {
+                    locale="no"; // Use something different than 'en' 
+                    // if the JVM supports it.
+                    break;
+                }
+            }
+
             JDBCDataSource.setBeanProperty(
-                    ds, "ConnectionAttributes", "create=true;territory=no;collation=TERRITORY_BASED");
+                    ds, "ConnectionAttributes", 
+                    "create=true;territory="+locale+";"
+                        +"collation=TERRITORY_BASED");
             ds.getConnection().close();
             break;
             



Mime
View raw message