db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r542023 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang: ShutdownDatabaseTest.java StatementPlanCacheTest.java SysDiagVTIMappingTest.java
Date Sun, 27 May 2007 19:04:30 GMT
Author: kahatlen
Date: Sun May 27 12:04:29 2007
New Revision: 542023

URL: http://svn.apache.org/viewvc?view=rev&rev=542023
Log:
DERBY-2709: lang/ShutdownDatabaseTest, lang/StatementPlanCacheTest and
lang/SysDiagVTIMappingTest keep references to closed JDBC objects

Fixed tearDown() methods.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ShutdownDatabaseTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/StatementPlanCacheTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SysDiagVTIMappingTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ShutdownDatabaseTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ShutdownDatabaseTest.java?view=diff&rev=542023&r1=542022&r2=542023
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ShutdownDatabaseTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ShutdownDatabaseTest.java
Sun May 27 12:04:29 2007
@@ -83,6 +83,7 @@
         st.execute("DROP TABLE TEST_TABLE");
         st.close();
         commit();
+        super.tearDown();
     }
 
     /**

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/StatementPlanCacheTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/StatementPlanCacheTest.java?view=diff&rev=542023&r1=542022&r2=542023
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/StatementPlanCacheTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/StatementPlanCacheTest.java
Sun May 27 12:04:29 2007
@@ -126,7 +126,9 @@
     
     protected void tearDown() throws Exception {
         cacheInPlanPS_ID.close();
+        cacheInPlanPS_ID = null;
         cacheInPlanPS_TEXT.close();
+        cacheInPlanPS_TEXT = null;
         super.tearDown();
     }
     

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SysDiagVTIMappingTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SysDiagVTIMappingTest.java?view=diff&rev=542023&r1=542022&r2=542023
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SysDiagVTIMappingTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SysDiagVTIMappingTest.java
Sun May 27 12:04:29 2007
@@ -69,14 +69,19 @@
 
     public void setUp() throws Exception
     {
-        createStatement().execute("create table app.t1 (i int, c varchar(10))");
-        createStatement().execute("insert into app.t1 values (1, 'one'), "
+        Statement stmt = createStatement();
+        stmt.execute("create table app.t1 (i int, c varchar(10))");
+        stmt.execute("insert into app.t1 values (1, 'one'), "
             + "(2, 'two'), (4, 'four')");
+        stmt.close();
     }
 
     public void tearDown() throws Exception
     {
-        createStatement().execute("drop table app.t1");
+        Statement stmt = createStatement();
+        stmt.execute("drop table app.t1");
+        stmt.close();
+        super.tearDown();
     }
 
     /**



Mime
View raw message