db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1523821 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerTest.java
Date Mon, 16 Sep 2013 21:31:49 GMT
Author: mamta
Date: Mon Sep 16 21:31:49 2013
New Revision: 1523821

URL: http://svn.apache.org/r1523821
Log:
DERBY-5866( testFiringConstraintOrder(org.apache.derbyTesting.functionTests.tests.lang.TriggerTest)junit.framework.AssertionFailedError:
matching triggers need to be fired in order creation:1,NO CASCADE BEFORE,DELETE,ROW)

As per Knut's recommendation, moving cleanup of TRIGGER_INFO back to tearDown(). Otherwise,
the info from the last test case in TriggerTest won't be released until the JVM terminates.
I don't expect it to take up a huge amount of memory, but with the big number of tests in
suites.All unreleased data structures could accumulate and cause OOME.


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

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerTest.java?rev=1523821&r1=1523820&r2=1523821&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerTest.java
Mon Sep 16 21:31:49 2013
@@ -100,8 +100,7 @@ public class TriggerTest extends BaseJDB
         // 1,NO CASCADE BEFORE,DELETE,ROW )
         //Do the cleanup here rather than in tearDown. This way, if a test
         // fixture fails, we will have the left over wombat database with
-        // the schema and data used by the failing fixture.  
-        TRIGGER_INFO.set(null);
+        // the schema and data used by the failing fixture.
         JDBC.dropSchema(getConnection().getMetaData(),
                 getTestConfiguration().getUserName());
         Statement s = createStatement();
@@ -113,7 +112,13 @@ public class TriggerTest extends BaseJDB
         s.close();
 
     }
-    
+
+    protected void tearDown() throws Exception
+    {
+        TRIGGER_INFO.set(null);
+        super.tearDown();
+    }
+
     /**
      * Test that invalidating stored statements marks the statement invalid
      *  in SYS.SYSSTATEMENTS. And when one of those invalid statements is



Mime
View raw message