db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r696820 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: master/ master/jdk16/ suites/ tests/derbynet/ tests/lang/
Date Thu, 18 Sep 2008 21:29:28 GMT
Author: myrnavl
Date: Thu Sep 18 14:29:28 2008
New Revision: 696820

URL: http://svn.apache.org/viewvc?rev=696820&view=rev
Log:
DERBY-2514; final steps of converting lang/closed.java to junit

Removed:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/closed.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk16/closed.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/closed.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/closed_app.properties
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/closed_sed.properties
Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SqlExceptionTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall?rev=696820&r1=696819&r2=696820&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall
Thu Sep 18 14:29:28 2008
@@ -4,7 +4,6 @@
 lang/altertable.sql
 lang/autoincrement.sql
 lang/checkConstraint.sql
-lang/closed.java
 lang/columnDefaults.sql
 lang/compressTable.sql
 lang/consistencyChecker.sql

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SqlExceptionTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SqlExceptionTest.java?rev=696820&r1=696819&r2=696820&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SqlExceptionTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SqlExceptionTest.java
Thu Sep 18 14:29:28 2008
@@ -21,6 +21,7 @@
 
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
 import org.apache.derbyTesting.junit.JDBC;
+import org.apache.derbyTesting.junit.TestConfiguration;
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
@@ -106,7 +107,17 @@
      * driver can be serialized (DERBY-790).
      */
     public void testSerializedException() throws Exception {
-
+        // DERBY-62; verify an exception using table name can be serialized.
+        try {
+            createStatement().execute("DROP TABLE APP.DERBY62_DAIN_SUNDSTROM");
+            fail("should've received an error");
+        } catch (SQLException sqle) {
+            SQLException se_ser = recreateSQLException(sqle);
+            // and that the original and serialized exceptions are equals
+            assertSQLState("Unexpected SQL State", sqle.getSQLState(), se_ser);
+            assertSQLExceptionEquals(sqle, se_ser);
+        }
+        
         try {
             Connection conn = getConnection();
             Statement stmt = conn.createStatement();
@@ -187,8 +198,10 @@
     	if ( JDBC.vmSupportsJSR169())
     		// see DERBY-2157 for details
     		return new TestSuite("empty SqlExceptionTest - client not supported on JSR169");
-    	else 
-    		return new TestSuite(SqlExceptionTest.class,
-                "SqlExceptionTest");
+    	else
+        {
+            Test test = TestConfiguration.defaultSuite(SqlExceptionTest.class);
+            return test;
+        }
     }
 }



Mime
View raw message