db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r432456 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi: BLOBTest.java ResultSetCloseTest.java
Date Fri, 18 Aug 2006 00:59:20 GMT
Author: djd
Date: Thu Aug 17 17:59:18 2006
New Revision: 432456

URL: http://svn.apache.org/viewvc?rev=432456&view=rev
Log:
Make ResultSetCloseTest and BLOBTest use the utility methods from BaseJDBCTestCase instead
of using getXConnection().

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

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BLOBTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BLOBTest.java?rev=432456&r1=432455&r2=432456&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BLOBTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BLOBTest.java
Thu Aug 17 17:59:18 2006
@@ -57,7 +57,7 @@
         throws SQLException, IOException
     {
         final Statement stmt = 
-            getXConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
+            createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
                                 ResultSet.CONCUR_UPDATABLE);
         final ResultSet rs = 
             stmt.executeQuery("SELECT * from " + 
@@ -86,7 +86,7 @@
         throws SQLException, IOException
     {
         final Statement stmt = 
-            getXConnection().createStatement(ResultSet.TYPE_FORWARD_ONLY,
+            createStatement(ResultSet.TYPE_FORWARD_ONLY,
                                 ResultSet.CONCUR_UPDATABLE);
         final ResultSet rs = 
             stmt.executeQuery("SELECT * from " + 
@@ -116,7 +116,7 @@
         throws SQLException, IOException
     {
         final Statement stmt = 
-            getXConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
+            createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
                                 ResultSet.CONCUR_UPDATABLE);
         final ResultSet rs = 
             stmt.executeQuery("SELECT * from " + 
@@ -147,7 +147,7 @@
         throws SQLException, IOException
     {
         final Statement stmt = 
-            getXConnection().createStatement(ResultSet.TYPE_FORWARD_ONLY,
+            createStatement(ResultSet.TYPE_FORWARD_ONLY,
                                 ResultSet.CONCUR_UPDATABLE);
         final ResultSet rs = 
             stmt.executeQuery("SELECT * from " + 
@@ -177,7 +177,7 @@
         throws SQLException, IOException
     {
         final Statement stmt = 
-            getXConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
+            createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
                                 ResultSet.CONCUR_UPDATABLE);
         final ResultSet rs = 
             stmt.executeQuery("SELECT data,val,length from " + 
@@ -207,7 +207,7 @@
         throws SQLException, IOException
     {
         final Statement stmt = 
-            getXConnection().createStatement(ResultSet.TYPE_FORWARD_ONLY,
+            createStatement(ResultSet.TYPE_FORWARD_ONLY,
                                 ResultSet.CONCUR_UPDATABLE);
         final ResultSet rs = 
             stmt.executeQuery("SELECT data,val,length from " + 
@@ -238,7 +238,7 @@
         throws SQLException, IOException
     {
         final Statement stmt = 
-            getXConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
+            createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
                                 ResultSet.CONCUR_UPDATABLE);
         final ResultSet rs = 
             stmt.executeQuery("SELECT data from " + 
@@ -271,7 +271,7 @@
         throws SQLException, IOException
     {
         final Statement stmt = 
-            getXConnection().createStatement(ResultSet.TYPE_FORWARD_ONLY,
+            createStatement(ResultSet.TYPE_FORWARD_ONLY,
                                 ResultSet.CONCUR_UPDATABLE);
         final ResultSet rs = 
             stmt.executeQuery("SELECT data from " + 
@@ -364,7 +364,7 @@
     {
         println("Verify new value in table: " + newVal);
         
-        final Statement stmt = getXConnection().createStatement(ResultSet.TYPE_FORWARD_ONLY,

+        final Statement stmt = createStatement(ResultSet.TYPE_FORWARD_ONLY, 
                                                    ResultSet.CONCUR_READ_ONLY);
         
         final ResultSet rs = 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetCloseTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetCloseTest.java?rev=432456&r1=432455&r2=432456&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetCloseTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetCloseTest.java
Thu Aug 17 17:59:18 2006
@@ -82,10 +82,9 @@
      *
      */
     public void testResultSetDoesNotClose() throws SQLException {
-        Connection con = getXConnection();
         
-        PreparedStatement ps1 = con.prepareStatement("select * from t1");
-        PreparedStatement ps2 = con.prepareStatement("select 10/a from t1");
+        PreparedStatement ps1 = prepareStatement("select * from t1");
+        PreparedStatement ps2 = prepareStatement("select 10/a from t1");
         
         ResultSet rs1 = ps1.executeQuery();
         
@@ -98,7 +97,7 @@
         
         while(rs1.next());
         
-        ps1.getConnection().commit();
+        commit();
         
         rs1.close();
         ps1.close();



Mime
View raw message