db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r645706 - /db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
Date Mon, 07 Apr 2008 21:45:48 GMT
Author: mamta
Date: Mon Apr  7 14:45:48 2008
New Revision: 645706

URL: http://svn.apache.org/viewvc?rev=645706&view=rev
Log:
migrating revision 645665 from trunk into 10.4 codeline (DERBY-3320).

The commit comments were as follows
Fix for the test that was added for DERBY-3320. The test was using DriverManager.getConnection
but DriverManager is not available in JSR 169 environment. This caused the test to fail
when run in JSR 169 environment. I have fixed the test to use testUtil.getConnection
which is smart enough to use DriverManager or DataSource depending on what VM the test
is getting run in.


Modified:
    db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java

Modified: db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java?rev=645706&r1=645705&r2=645706&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
(original)
+++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
Mon Apr  7 14:45:48 2008
@@ -48,6 +48,7 @@
 import org.apache.derbyTesting.junit.JDBC;
 import org.apache.derbyTesting.junit.JDBCDataSource;
 import org.apache.derbyTesting.junit.TestConfiguration;
+import org.apache.derbyTesting.functionTests.util.TestUtil;
 
 public class CollationTest extends BaseJDBCTestCase {
 
@@ -1245,12 +1246,14 @@
  * locale xx.
  */
 public void testMissingCollatorSupport() throws SQLException {
-      String url = TestConfiguration.getCurrent().getJDBCUrl("localeXXdb");
-
-      loadDriver();
-      String defaultdburl = url + ";create=true;territory=xx;collation=TERRITORY_BASED";
+      String createDBurl = ";create=true;territory=xx;collation=TERRITORY_BASED";
 	  try {
-	      DriverManager.getConnection(defaultdburl);
+		  //Use following utility method rather than 
+		  //DriverManager.getConnection because the following utility method 
+		  //will use DataSource or DriverManager depending on the VM that is 
+		  //being used. Use of DriverManager to get a Connection will faile
+		  //on JSR169 VMs. DERBY-3052
+		  TestUtil.getConnection("missingCollatorDB", createDBurl);
 	  } catch (SQLException sqle) {
           //Database can't be created because Collator support does not exist
 		  //for the requested locale



Mime
View raw message