[
https://issues.apache.org/jira/browse/DERBY-4323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Knut Anders Hatlen updated DERBY-4323:
--------------------------------------
Attachment: d4323-1a.diff
I haven't been able to reproduce the failure, but here's a patch that I'm
planning to commit, and that I expect to reduce the risk of this happening
again.
Currently, the test has a race between two threads that perform the following
steps:
T1_1: compile query
T1_2: start executing query
T1_3: lock row
T2_1: start new thread
T2_2: compile query
T2_3: start executing query
T2_4: lock row
The events T1_3 and T2_4 must happen no more than 2 seconds apart.
The patch makes sure that both of the two threads have completed the query
compilation before the race starts. Since there are less steps to be done
concurrently, and also the amount of work done concurrently is more evenly
distributed, the chance of a big time difference in the last step should be
smaller.
It does this by splitting up Statement.executeQuery() into prepareStatement() +
executeQuery() and introducing a barrier before the executeQuery() calls to
make sure they start at the same time.
I factored out the already existing Barrier classes from IndexSplitDeadlockTest
and DeadlockDetectionTest for this purpose (since we cannot use
java.util.concurrent.CyclicBarrier as long as we support platforms less capable
than Java 5).
> test failure in lang.ErrorMessageTest with IBM iseries IBM 1.5
> --------------------------------------------------------------
>
> Key: DERBY-4323
> URL: https://issues.apache.org/jira/browse/DERBY-4323
> Project: Derby
> Issue Type: Bug
> Components: Test
> Affects Versions: 10.5.2.0
> Environment: IBM iseries, OS: AS/400; OS version: V5R4M0, IBM 1.5
> (1.5.0_13-b05)
> Reporter: Myrna van Lunteren
> Assignee: Knut Anders Hatlen
> Priority: Minor
> Labels: derby_triage10_8
> Attachments: d4323-1a.diff, ErrorMessageTest_derby.log,
> error-stacktrace.out
>
>
> There was this error during the 10.5.2.0 test run - when the ErrorMessageTest
> was run by itself later there was no problem, and neither did this show up
> during the ibm 1.6 run:
> 1)
> testDeadlockTimeout(org.apache.derbyTesting.functionTests.tests.lang.ErrorMessageTest)junit.framework.ComparisonFailure:
> Not a deadlock expected:<...001> but was:<...XL2>
--
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