db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r535973 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceTest.java
Date Mon, 07 May 2007 20:07:23 GMT
Author: kmarsden
Date: Mon May  7 13:07:22 2007
New Revision: 535973

URL: http://svn.apache.org/viewvc?view=rev&rev=535973
Log:
DERBY-1025 / DERBY-2620 test cases
Make sure statement is created with holdability CLOSE_CURSORS_AT_COMMIT when testing if xa_start
commits the transaction.  Exempt embedded from running DERBY-1025 test because of 08003 -
No current connection 


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceTest.java?view=diff&rev=535973&r1=535972&r2=535973
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceTest.java
Mon May  7 13:07:22 2007
@@ -1027,7 +1027,7 @@
         Connection conn4 = xac4.getConnection();
         assertTrue(conn4.getAutoCommit());
 
-        Statement s4 = conn4.createStatement();
+        Statement s4 = conn4.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY,
ResultSet.CLOSE_CURSORS_AT_COMMIT);
         ResultSet rs4 = s4.executeQuery("select i from autocommitxastart");
         rs4.next();
         assertEquals(1, rs4.getInt(1));
@@ -1050,12 +1050,12 @@
         // appear to be closed, and we actually get a value.
         try {
             rs4.next();
-            rs4.getInt(1);
-            if (usingEmbedded())
-                fail ("expected an exception indicating resultset is closed.");
+            rs4.getInt(1);            
+            fail ("expected an exception indicating resultset is closed.");
         } catch (SQLException sqle) {
-            // expect 08003 - No current connection (or similar).
-            assertSQLState("08003",sqle);
+            // Embedded gets 08003. No current connection DERBY-2620        	
+        	if (usingDerbyNetClient())
+        		assertSQLState("XCL16",sqle);
         }
 
         conn4.setAutoCommit(false);



Mime
View raw message