We are running into DERBY-5774(Failures in UpdateStatisticsTest (order-dependent test cases)). I will work on backporting these changes into 10.8 and that should take care of the failures seen in 10.8 codeline
On Sat, Jun 29, 2013 at 6:44 PM, Mamta Satoor <[email protected]> wrote: > Looking more at the test failures above, the stats table is showing left > over stats for tables created in testDisposableStatsEagerness. I will > change the test to drop the tables at the end of the test fixture so > testUpdateStatistics won't fail when it finds stats for those leftover > stats from another test > > > > On Sat, Jun 29, 2013 at 4:35 PM, Mamta Satoor <[email protected]> wrote: > >> I see that after my backport for DERBY-5680 to 10.8, >> lang.UpdateStatisticsTest has started failing on 10.8. I don't understand >> why the test fails on Sun's machine but not on my Windows XP with IBM jdk >> 1.6. I am looking more into this. The failure reported on Sun's runs of the >> test is as follows >> >> junit.framework.AssertionFailedError: Index statistics for <ALL TABLES> >> 1: {tableId=25347265-013f-8c71-7445-fffff6662cff, >> tableName=DISPOSABLE_STATS_EAGERNESS_FK, indexName=SQL130628223832620, >> lcols=1, rows=1000, unique/card=1000, created=2013-06-28 22:38:32.672} >> 2: {tableId=f0cfb26b-013f-8c71-7445-fffff6662cff, >> tableName=DISPOSABLE_STATS_EAGERNESS, >> indexName=NU_DISPOSABLE_STATS_EAGERNESS, lcols=1, rows=1000, unique/card=35, >> created=2013-06-28 22:38:32.688} >> 3: {tableId=f0cfb26b-013f-8c71-7445-fffff6662cff, >> tableName=DISPOSABLE_STATS_EAGERNESS, indexName=SQL130628223832640, lcols=1, >> rows=1000, unique/card=1000, created=2013-06-28 22:38:32.672} >> 4: {tableId=f0cfb26b-013f-8c71-7445-fffff6662cff, >> tableName=DISPOSABLE_STATS_EAGERNESS, indexName=SQL130628223832621, lcols=1, >> rows=1000, unique/card=1000, created=2013-06-28 22:38:32.672} >> 5: {tableId=f0cfb26b-013f-8c71-7445-fffff6662cff, >> tableName=DISPOSABLE_STATS_EAGERNESS, indexName=SQL130628223832621, lcols=2, >> rows=1000, unique/card=1000, created=2013-06-28 22:38:32.672} >> expected:<0> but was:<5> >> at >> org.apache.derbyTesting.junit.IndexStatsUtil.assertStats(IndexStatsUtil.java:132) >> at >> org.apache.derbyTesting.junit.IndexStatsUtil.assertNoStats(IndexStatsUtil.java:109) >> at >> org.apache.derbyTesting.functionTests.tests.lang.UpdateStatisticsTest.testUpdateStatistics(UpdateStatisticsTest.java:93) >> 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 >> 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 >> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57) >> >> >> >> 3246 >> org.apache.derbyTesting.functionTests.tests.lang.UpdateStatisticsTest.testUpdateStatistics >> 0.468 s >> >> junit.framework.AssertionFailedError: Index statistics for <ALL TABLES> >> 1: {tableId=10947565-013f-8c71-7445-fffff6662cff, >> tableName=DISPOSABLE_STATS_EAGERNESS_FK, indexName=SQL130628223838830, >> lcols=1, rows=1000, unique/card=1000, created=2013-06-28 22:38:38.913} >> 2: {tableId=e0afb56b-013f-8c71-7445-fffff6662cff, >> tableName=DISPOSABLE_STATS_EAGERNESS, >> indexName=NU_DISPOSABLE_STATS_EAGERNESS, lcols=1, rows=1000, unique/card=35, >> created=2013-06-28 22:38:38.929} >> 3: {tableId=e0afb56b-013f-8c71-7445-fffff6662cff, >> tableName=DISPOSABLE_STATS_EAGERNESS, indexName=SQL130628223838851, lcols=1, >> rows=1000, unique/card=1000, created=2013-06-28 22:38:38.913} >> 4: {tableId=e0afb56b-013f-8c71-7445-fffff6662cff, >> tableName=DISPOSABLE_STATS_EAGERNESS, indexName=SQL130628223838850, lcols=1, >> rows=1000, unique/card=1000, created=2013-06-28 22:38:38.913} >> 5: {tableId=e0afb56b-013f-8c71-7445-fffff6662cff, >> tableName=DISPOSABLE_STATS_EAGERNESS, indexName=SQL130628223838850, lcols=2, >> rows=1000, unique/card=1000, created=2013-06-28 22:38:38.913} >> expected:<0> but was:<5> >> at >> org.apache.derbyTesting.junit.IndexStatsUtil.assertStats(IndexStatsUtil.java:132) >> at >> org.apache.derbyTesting.junit.IndexStatsUtil.assertNoStats(IndexStatsUtil.java:109) >> at >> org.apache.derbyTesting.functionTests.tests.lang.UpdateStatisticsTest.testUpdateStatistics(UpdateStatisticsTest.java:93) >> 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 >> 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) >> 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) >> >> Here is the test snippet where it's failing >> */ >> public void testUpdateStatistics() throws SQLException { >> // Helper object to obtain information about index statistics. >> IndexStatsUtil stats = new IndexStatsUtil(openDefaultConnection()); >> >> >> Statement s = createStatement(); >> //following should fail because table APP.T1 does not exist >> assertStatementError("42Y55", s, >> "CALL SYSCS_UTIL.SYSCS_UPDATE_STATISTICS('APP','T1',null)"); >> >> >> s.executeUpdate("CREATE TABLE t1 (c11 int, c12 varchar(128))"); >> //following will pass now because we have created APP.T1 >> s.execute("CALL >> SYSCS_UTIL.SYSCS_UPDATE_STATISTICS('APP','T1',null)"); >> >> >> //following should fail because index I1 does not exist on table >> APP.T1 >> assertStatementError("42X65", s, >> "CALL SYSCS_UTIL.SYSCS_UPDATE_STATISTICS('APP','T1','I1')"); >> >> >> s.executeUpdate("CREATE INDEX i1 on t1(c12)"); >> //following will pass now because we have created index I1 on APP.T1 >> s.execute("CALL >> SYSCS_UTIL.SYSCS_UPDATE_STATISTICS('APP','T1','I1')"); >> >> >> //The following set of subtest will ensure that when an index is >> //created on a table when there is no data in the table, then Derby >> //will not generate a row for it in sysstatistics table. If the index >> >> >> //is created after the table has data on it, there will be a row for >> //it in sysstatistics table. In order to generate statistics for the >> //first index, users can run the stored procedure >> >> >> //SYSCS_UPDATE_STATISTICS >> //So far the table t1 is empty and we have already created index I1 >> on >> //it. Since three was no data in the table when index I1 was created, >> //there will be no row in sysstatistics table >> >> >> stats.assertNoStats(); >> >> >> >> >> >> ---------- Forwarded message ---------- >> From: <[email protected]> >> Date: Fri, Jun 28, 2013 at 5:23 PM >> Subject: [Java DB - testing] Error nightly 10.8 (rev 1497868) >> To: [email protected] >> >> >> Java DB testing and reporting infrastructure. >> >> Error nightly 10.8 (rev 1497868) >> >> There were execution errors and/or timeouts. >> There were at least 2 failures. >> >> Test report: >> http://download.java.net/javadesktop/derby/javadb-5579017-report/ >> >> >
