You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by ma...@apache.org on 2013/04/25 00:04:14 UTC
svn commit: r1471721 -
/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerTest.java
Author: mamta
Date: Wed Apr 24 22:04:11 2013
New Revision: 1471721
URL: http://svn.apache.org/r1471721
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)
Adding more debugging info
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=1471721&r1=1471720&r2=1471721&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 Wed Apr 24 22:04:11 2013
@@ -66,6 +66,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);
@@ -390,6 +392,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();
@@ -439,6 +442,7 @@ public class TriggerTest extends BaseJDB
sb.append("')");
s.execute(sb.toString());
+ listOfCreatedTriggers.append(sb.toString());
}
commit();
s.close();
@@ -558,7 +562,7 @@ 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(), false);
lastOrder = order;
continue;
}