You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Mike Matrigali (JIRA)" <ji...@apache.org> on 2013/04/11 01:27:18 UTC
[jira] [Commented] (DERBY-6144) nightly regression test failure,
intermittent error :
testStatisticsCorrectness(org.apache.derbyTesting.functionTests.tests.store.AutomaticIndexStatisticsTest)junit.framework.AssertionFailedError
[ https://issues.apache.org/jira/browse/DERBY-6144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13628430#comment-13628430 ]
Mike Matrigali commented on DERBY-6144:
---------------------------------------
The following assert failed at line 332:
assertTrue(s.created.before(now));
A snippet of the test:
// Select to trigger statistics generation.
forceRowCountEstimateUpdate(TAB);
JDBC.assertDrainResults(
prepareStatement("select * from " + TAB + " where id1 = 10")
.executeQuery());
// We expect three stats objects for the single index; one per
// leading columns combination (c1, c1-c2, and c1-c2-c3).
IdxStats statsObj[] = stats.getStatsTable(TAB, 3);
assertEquals(3, statsObj.length);
Timestamp now = new Timestamp(new Date().getTime());
for (int i=0; i < statsObj.length; i++) {
IdxStats s = statsObj[i];
assertEquals(rows, s.rows);
assertTrue(s.created.before(now));
switch (s.lcols) {
case 1:
assertEquals(100, s.card);
break;
case 2:
assertEquals(5000, s.card);
break;
case 3:
assertEquals(50000, s.card);
break;
default:
fail("unexpected number of leading columns: " + s.lcols);
}
}
Timestamp now = new Timestamp(new Date().getTime());
It failed sometime friday 4/5 night or 4/6 morning. I think this means it is not a daylight savings time issue.
I think what is being tested is that background stat is creating stats and that those stats were created before "now". I have
sometimes seen harware dependent issues with this kind of thing and stuff going so fast that maybe the time they were
created and now are the same value.
I am running 100 times to see if I can reproduce but so far no luck, and considering at least changing the test to print the interesting bits on failure,
and possibly adding a sleep before getting "now" to make sure clock time elapses between stat creation and "now".
> nightly regression test failure, intermittent error : testStatisticsCorrectness(org.apache.derbyTesting.functionTests.tests.store.AutomaticIndexStatisticsTest)junit.framework.AssertionFailedError
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-6144
> URL: https://issues.apache.org/jira/browse/DERBY-6144
> Project: Derby
> Issue Type: Bug
> Components: Test
> Affects Versions: 10.10.1.2
> Environment: windows, ibm17
> Reporter: Mike Matrigali
>
> failure in nightly regression test, candidate 10.10 branch, ibm17
> may be related to daylight savings time change, there were similar resolved bugs that were marked fixed,
> so reporting new one in case this is different.
> http://people.apache.org/~myrnavl/derby_test_results/v10_10/windows/testlog/ibm17/1461391-suites.All_diff.txt
> There was 1 failure:
> 1) testStatisticsCorrectness(org.apache.derbyTesting.functionTests.tests.store.AutomaticIndexStatisticsTest)junit.framework.AssertionFailedError
> at org.apache.derbyTesting.functionTests.tests.store.AutomaticIndexStatisticsTest.testStatisticsCorrectness(AutomaticIndexStatisticsTest.java:332)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
> 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)
> 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)
--
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