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

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

Committed a test change with revision 1467170 into trunk (10.11) and following 
comments
************************************
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)

In case of failure, this test only has information about the failing trigger. 
It will be good to also have a complete list of triggers in the order that they 
got fired. This will help figure out the intermittent test failure,

Some background information on the test
The failing 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 INSERTS/UPDATES/DELETES and for each case, it 
wants to test if the eligible triggers are fired in the order they were 
created. For instance a DELETE 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 trigge
 rs 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 created 
before trigger 0.
************************************

                
>  
> 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
>             Fix For: 10.11.0.0
>
>
> 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

Reply via email to