db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1523501 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerTest.java
Date Sun, 15 Sep 2013 20:37:48 GMT
Author: mamta
Date: Sun Sep 15 20:37:48 2013
New Revision: 1523501

URL: http://svn.apache.org/r1523501
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 )

Move the cleanup code from tearDown() to setup() so that if a test fixture fails, we will
have the left over wombat database with the schema and data used by the failing fixture for
further debugging.




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=1523501&r1=1523500&r2=1523501&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
Sun Sep 15 20:37:48 2013
@@ -93,6 +93,17 @@ public class TriggerTest extends BaseJDB
     
     protected void setUp() throws Exception
     {
+        //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 )
+        //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);
+        JDBC.dropSchema(getConnection().getMetaData(),
+                getTestConfiguration().getUserName());
         Statement s = createStatement();
         s.executeUpdate("CREATE PROCEDURE TRIGGER_LOG_INFO(" +
                 "O VARCHAR(255)) " +
@@ -103,15 +114,6 @@ public class TriggerTest extends BaseJDB
 
     }
     
-    protected void tearDown() throws Exception
-    {
-        TRIGGER_INFO.set(null);
-        JDBC.dropSchema(getConnection().getMetaData(),
-                getTestConfiguration().getUserName());
-
-        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