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

Myrna van Lunteren commented on DERBY-5667:
-------------------------------------------

I made a little modification in JDBC.assertUnorderedResultSet, and added a 
commit to UpdateLocksTest.teardown, and this resulted in the following test 
output (ibm 1.4.2, 10.8, on my windows 7 laptop):

(emb)store.Derby4676Test.testConcurrentFetchAndDelete used 4817 ms .
(net)store.Derby4676Test.testConcurrentFetchAndDelete used 4103 ms .
(emb)store.UpdateLocksTest.testRepeatableRead used 3814 ms .
(emb)store.UpdateLocksTest.testReadCommitted used 3401 ms .
(emb)store.UpdateLocksTest.testSerializable used 3568 ms F.
(emb)store.UpdateLocksTest.testReadUncommitted used 1773 ms F
Time: 28.754
There were 2 failures:
1) 
testSerializable(org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest)junit.framework.AssertionFailedError:
 Unexpected row count, expected: 2, actual: 3
         expected rows:
                [[APP, UserTran, TABLE, 2, IX, A, Tablelock, GRANT, ACTIVE], 
[APP, UserTran, ROW, 3, X, A, (1,9), GRANT, ACTIVE]]
         actual result:
                [[APP, UserTran, TABLE, 2, IX, A, Tablelock, GRANT, ACTIVE], 
[APP, UserTran, ROW, 1, U, A, (1,9), GRANT, ACTIVE], [APP, UserTran, ROW, 2, X, 
A, (1,9), GRANT, ACTIVE]] expected:<2> but was:<3>
        at 
org.apache.derbyTesting.junit.JDBC.assertUnorderedResultSet(JDBC.java(Compiled 
Code))
        at 
org.apache.derbyTesting.junit.JDBC.assertUnorderedResultSet(JDBC.java:1304)
        at 
org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest.updateBtreeSetLocks(UpdateLocksTest.java:7028)
        at 
org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest.doRunTests(UpdateLocksTest.java:254)
        at 
org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest.testSerializable(UpdateLocksTest.java:166)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:61)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled
 Code))
        at 
org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:113)
        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 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)
2) 
testReadUncommitted(org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest)junit.framework.AssertionFailedError:
 Unexpected row count, expected: 3, actual: 2
         expected rows:
                [[APP, UserTran, TABLE, 2, IX, A, Tablelock, GRANT, ACTIVE], 
[APP, UserTran, ROW, 1, X, A, (1,10), GRANT, ACTIVE], [APP, UserTran, ROW, 3, 
X, A, (1,9), GRANT, ACTIVE]]
         actual result:
                [[APP, UserTran, TABLE, 2, IX, A, Tablelock, GRANT, ACTIVE], 
[APP, UserTran, ROW, 2, X, A, (1,9), GRANT, ACTIVE]] expected:<3> but was:<2>
        at 
org.apache.derbyTesting.junit.JDBC.assertUnorderedResultSet(JDBC.java(Compiled 
Code))
        at 
org.apache.derbyTesting.junit.JDBC.assertUnorderedResultSet(JDBC.java:1304)
        at 
org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest.updateBtreeSetLocks(UpdateLocksTest.java:7472)
        at 
org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest.doRunTests(UpdateLocksTest.java:266)
        at 
org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest.testReadUncommitted(UpdateLocksTest.java:170)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:61)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled
 Code))
        at 
org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:113)
        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 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)

It is surprising that I can make UpdateLocksTest fail when run after 
Derby4676Test. But if we're assuming that there issue is background threads 
from the deletes in the earlier test, then why doesn't that show up in the 
first test cases?

I can modify the 10.8 store._Suite so it runs the two tests in reverse order 
with ibm 1.4.2.
But I would like to understand a bit more, in case failures pop up again in 
UpdateLocksTest on later branches with newer jvms.


> testReadCommitted(org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest)junit.framework.AssertionFailedError:
>  Missing rows in ResultSet
> ---------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5667
>                 URL: https://issues.apache.org/jira/browse/DERBY-5667
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.8.3.0
>            Reporter: Mike Matrigali
>            Assignee: Myrna van Lunteren
>             Fix For: 10.8.3.0, 10.9.1.0
>
>         Attachments: DERBY-5667.diff, DERBY-5667_2.diff, DERBY-5667_3.diff, 
> DERBY-5667_3_109.diff, DERBY-5667_3b.diff
>
>
> one failure and 2 errors which I would guess are because of the failure.  
> Failed against 10.8 branch, ibm15, windows, build 1302046
> There were 2 errors:
> 1) 
> testSerializable(org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest)java.sql.SQLException:
>  Table/View 'A' already exists in Schema 'APP'.
>       at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
>       at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown 
> Source)
>       at 
> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown 
> Source)
>       at 
> org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown 
> Source)
>       at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown 
> Source)
>       at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown 
> Source)
>       at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown 
> Source)
>       at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
>       at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(Unknown 
> Source)
>       at 
> org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest.doRunTests(UpdateLocksTest.java:185)
>       at 
> org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest.testSerializable(UpdateLocksTest.java:154)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at 
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:113)
>       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 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)
> Caused by: ERROR X0Y32: Table/View 'A' already exists in Schema 'APP'.
>       at org.apache.derby.iapi.error.StandardException.newException(Unknown 
> Source)
>       at 
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.duplicateDescriptorException(Unknown
>  Source)
>       at 
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptor(Unknown 
> Source)
>       at 
> org.apache.derby.impl.sql.execute.CreateTableConstantAction.executeConstantAction(Unknown
>  Source)
>       at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source)
>       at 
> org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
>       at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown 
> Source)
>       ... 36 more
> 2) 
> testReadUncommitted(org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest)java.sql.SQLException:
>  Table/View 'A' already exists in Schema 'APP'.
>       at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
>       at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown 
> Source)
>       at 
> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown 
> Source)
>       at 
> org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown 
> Source)
>       at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown 
> Source)
>       at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown 
> Source)
>       at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown 
> Source)
>       at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
>       at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(Unknown 
> Source)
>       at 
> org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest.doRunTests(UpdateLocksTest.java:185)
>       at 
> org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest.testReadUncommitted(UpdateLocksTest.java:158)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at 
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:113)
>       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 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)
> Caused by: ERROR X0Y32: Table/View 'A' already exists in Schema 'APP'.
>       at org.apache.derby.iapi.error.StandardException.newException(Unknown 
> Source)
>       at 
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.duplicateDescriptorException(Unknown
>  Source)
>       at 
> org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptor(Unknown 
> Source)
>       at 
> org.apache.derby.impl.sql.execute.CreateTableConstantAction.executeConstantAction(Unknown
>  Source)
>       at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source)
>       at 
> org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
>       at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown 
> Source)
>       ... 36 more
> There were 2 failures:
> 1) 
> testReadCommitted(org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest)junit.framework.AssertionFailedError:
>  Missing rows in ResultSet
>       at 
> org.apache.derbyTesting.junit.JDBC.assertUnorderedResultSet(JDBC.java:1349)
>       at 
> org.apache.derbyTesting.junit.JDBC.assertUnorderedResultSet(JDBC.java:1285)
>       at 
> org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest.updateBtreeSetLocks(UpdateLocksTest.java:6764)
>       at 
> org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest.doRunTests(UpdateLocksTest.java:387)
>       at 
> org.apache.derbyTesting.functionTests.tests.store.UpdateLocksTest.testReadCommitted(UpdateLocksTest.java:150)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at 
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:113)
>       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 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)
> http://people.apache.org/~myrnavl/derby_test_results/v10_8/windows/testlog/ibm15/1302046-suites.All_diff.txt



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to