You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by ma...@apache.org on 2007/05/31 20:45:08 UTC
svn commit: r543209 -
/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
Author: mamta
Date: Thu May 31 11:45:07 2007
New Revision: 543209
URL: http://svn.apache.org/viewvc?view=rev&rev=543209
Log:
DERBY-2722
Before making call to XMLSERIALIZE, we should check if the classpath includes the required Xalan/JAXP classes. Otherwise the test will fail
with jvms, where these classes can't be found.
Modified:
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java?view=diff&rev=543209&r1=543208&r2=543209
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java Thu May 31 11:45:07 2007
@@ -31,6 +31,8 @@
import junit.framework.Test;
+import org.apache.derbyTesting.junit.XML;
+//import org.apache.derby.iapi.types.XML;
import org.apache.derbyTesting.junit.BaseJDBCTestCase;
import org.apache.derbyTesting.junit.JDBC;
import org.apache.derbyTesting.junit.JDBCDataSource;
@@ -213,10 +215,11 @@
" CHAR(ID)='0'", new String[] [] {{"0"}});
s.executeUpdate("set schema APP");
- checkLangBasedQuery(s, "SELECT XMLSERIALIZE(x as CHAR(10)) " +
- " FROM xmlTable, SYS.SYSTABLES WHERE " +
- " XMLSERIALIZE(x as CHAR(10)) = TABLENAME",
- null);
+ if (XML.classpathMeetsXMLReqs())
+ checkLangBasedQuery(s, "SELECT XMLSERIALIZE(x as CHAR(10)) " +
+ " FROM xmlTable, SYS.SYSTABLES WHERE " +
+ " XMLSERIALIZE(x as CHAR(10)) = TABLENAME",
+ null);
//Start of parameter testing
//Start with simple ? param in a string comparison
//Since all schemas (ie user and system) have the same collation, the
@@ -612,13 +615,16 @@
new String[][] {{"SYSCOLUMNS"} });
s.executeUpdate("set schema APP");
- assertStatementError("42818", s, "SELECT XMLSERIALIZE(x as CHAR(10)) " +
- " FROM xmlTable, SYS.SYSTABLES WHERE " +
- " XMLSERIALIZE(x as CHAR(10)) = TABLENAME");
- checkLangBasedQuery(s, "SELECT XMLSERIALIZE(x as CHAR(10)) FROM " +
- " xmlTable, SYS.SYSTABLES WHERE XMLSERIALIZE(x as CHAR(10)) = " +
- " CAST(TABLENAME AS CHAR(10))",
- null);
+ if (XML.classpathMeetsXMLReqs()) {
+ assertStatementError("42818", s, "SELECT XMLSERIALIZE(x as CHAR(10)) " +
+ " FROM xmlTable, SYS.SYSTABLES WHERE " +
+ " XMLSERIALIZE(x as CHAR(10)) = TABLENAME");
+ checkLangBasedQuery(s, "SELECT XMLSERIALIZE(x as CHAR(10)) FROM " +
+ " xmlTable, SYS.SYSTABLES WHERE XMLSERIALIZE(x as CHAR(10)) = " +
+ " CAST(TABLENAME AS CHAR(10))",
+ null);
+ }
+
//Start of parameter testing
//Start with simple ? param in a string comparison