db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta A. Satoor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (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
Date Fri, 12 Apr 2013 04:53:19 GMT

    [ https://issues.apache.org/jira/browse/DERBY-5866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13629791#comment-13629791
] 

Mamta A. Satoor commented on DERBY-5866:
----------------------------------------

I have spent time figuring out the test fixture and following is my understanding of testFiringConstraintOrder.
Test creates table T with primary key, unique key, check constraint. It creates another table
TCHILD which has a foreign key reference to table T. Next, the test creates a random number
of triggers on T. Triggers are one of the 12 types with various combinations of BEFORE/AFTER,
INSERT/UPDATE/DELETE, ROW/STATEMENT. The trigger definition has a string associated with it
which has a unique number and description of the type of trigger eg it might be '0,NO CASCADE
BEFORE, DELETE, ROW', next might be '1,NO CASCADE AFTER,INSERT,STATEMENT' and so on and so
forth. After the trigger creation, the test does various violations and wants to test if the
eligible triggers are fired in the order they are created. For instance a DELTE sql should
cause all BEFORE DELETE ROW triggers to fire in the order they were created. And if the order
of firing is not the order of creation, then we will run into an assertion failure error like
"matching triggers need to be fired in order creation:1,NO CASCADE BEFORE,DELETE,ROW". What
I find interesting though is that all the failures mentioned in this jira are for triggers
created at the very begnning. For instance, jira description has the failure "matching triggers
need to be fired in order creation:1,NO CASCADE BEFORE,DELETE,ROW" which means trigger number
1 got fired before I am assuming trigger number 0(provided trigger 0 is a NO CASCADE BEFORE
DELETE ROW". Another failure reported in this jira is for "0,NO CASCADE BEFORE,UPDATE,STATEMENT"
but there couldn't have been another trigger before trigger 0 so I am not sure how we could
be out of order in trigger firing in that case. 
In case of a failure, it will be good if we can print out all the triggers that are getting
created and the order in which they are getting fired so we know the sequence in which the
triggers are getting fired to understand the mismatch.
                
>  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
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5866
>                 URL: https://issues.apache.org/jira/browse/DERBY-5866
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.10.1.1, 10.10.1.2
>         Environment: Windows IBM 1.6 10.10.0.0 alpha - (1361856)
>            Reporter: Kathey Marsden
>            Assignee: Mamta A. Satoor
>              Labels: derby_triage10_10
>
> I saw this failure in the IBM nightlies on 7/15. The subsequent night did not fail, so
appears intermittent
> http://cloudsoft.usca.ibm.com/intranet/nightlies/derbywinvm/JarResults.2012-07-15/ibm16_suites.All/suites.All.out
> 1) 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
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.assertFiringOrder(TriggerTest.java:560)
> 	at org.apache.derbyTesting.functionTests.tests.lang.TriggerTest.testFiringConstraintOrder(TriggerTest.java:500)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:117)
> 	at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:424)
> 	at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:441)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> 	at junit.extensions.TestSetup.run(TestSetup.java:25)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message