db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r673635 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java
Date Thu, 03 Jul 2008 09:21:49 GMT
Author: kahatlen
Date: Thu Jul  3 02:21:48 2008
New Revision: 673635

URL: http://svn.apache.org/viewvc?rev=673635&view=rev
Log:
Use helper method to check SQLState.
Removed comment that's no longer valid.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java?rev=673635&r1=673634&r2=673635&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java
Thu Jul  3 02:21:48 2008
@@ -163,20 +163,9 @@
             con.close();
             fail("Invalid transaction state exception was not thrown");
         } catch (SQLException sqle) {
-            // The SQL State is incorrect in the embedded client, see
-            // JIRA id DERBY-1168
             String expectedState =
                 SQLStateConstants.INVALID_TRANSACTION_STATE_ACTIVE_SQL_TRANSACTION;
-            
-            if ( ! expectedState.equals(sqle.getSQLState()) )
-            {
-                System.err.println("ERROR: Unexpected SQL State encountered; "
-                    + "got " + sqle.getSQLState() + ", expected " 
-                    + expectedState +
-                    ". Unexpected exception message is " + sqle.getMessage());
-                
-                throw sqle;
-            }
+            assertSQLState(expectedState, sqle);
         }
         assertFalse("Statement should still be open, because " +
                 "Connection.close() failed", stmt.isClosed());



Mime
View raw message