db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1476415 - in /db/derby/code/branches/10.8: ./ java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerTest.java
Date Fri, 26 Apr 2013 22:05:45 GMT
Author: mamta
Date: Fri Apr 26 22:05:44 2013
New Revision: 1476415

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

Backporting additional debugging info to 10.8 codeline


Modified:
    db/derby/code/branches/10.8/   (props changed)
    db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerTest.java

Propchange: db/derby/code/branches/10.8/
------------------------------------------------------------------------------
  Merged /db/derby/code/trunk:r1471721,1475624
  Merged /db/derby/code/branches/10.10:r1476355

Modified: db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerTest.java?rev=1476415&r1=1476414&r2=1476415&view=diff
==============================================================================
--- db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerTest.java
(original)
+++ db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerTest.java
Fri Apr 26 22:05:44 2013
@@ -63,6 +63,8 @@ public class TriggerTest extends BaseJDB
      * allow recording information about the firing.
      */
     private static ThreadLocal TRIGGER_INFO = new ThreadLocal();
+    StringBuffer listOfCreatedTriggers = new StringBuffer();
+
 
     public TriggerTest(String name) {
         super(name);
@@ -250,6 +252,7 @@ public class TriggerTest extends BaseJDB
         // so pick enough triggers to get some
         // distribution across all 12.
         int triggerCount = r.nextInt(45) + 45;
+        listOfCreatedTriggers = new StringBuffer();
         for (int i = 0; i < triggerCount; i++)
         {
             StringBuffer sb = new StringBuffer();
@@ -299,6 +302,7 @@ public class TriggerTest extends BaseJDB
             sb.append("')");
 
             s.execute(sb.toString());
+            listOfCreatedTriggers.append(sb.toString());
         }
         commit();
         s.close();
@@ -418,7 +422,10 @@ public class TriggerTest extends BaseJDB
                     modifiedRowCount > 1 ? (order >= lastOrder) :
                         (order > lastOrder);
                 assertTrue("matching triggers need to be fired in order creation:"
-                        +info+". Triggers got fired in this order:"+TRIGGER_INFO.get().toString(),
orderOk);
+                        +info+". Triggers got fired in this order:"+
+                        TRIGGER_INFO.get().toString()+
+                        ". Tiggers got created in this order:"+
+                        listOfCreatedTriggers.toString(), orderOk);
                 lastOrder = order;
                 continue;
             }



Mime
View raw message