db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <knut.hat...@oracle.com>
Subject Re: Is IndexStatisticsDaemonImpl tested by our regression suite?
Date Thu, 02 May 2013 07:38:46 GMT
Bryan Pendleton <bpendleton.derby@gmail.com> writes:

> Hi all,
> While discussing DERBY-6164 with Ahsan, we noticed that the
> IndexStatisticsDaemonImpl class is listed in our coverage reports
> as being substantially under-tested:
> http://dbtg.foundry.sun.com/derby/test/coverage/_files/6d.html
> Does anyone know if the coverage report is accurate here? Is this
> class in fact being tested, and the coverage report is in error?

I don't know if it's accurate. It sounds reasonable that some of these
methods, like those that handle unexpected exception, don't get
exercised unless something unexpected happens.

Other parts of the report look less reasonable. Like the part that
updateIndexStatsMinion() doesn't get run at all. I think that method is
used by SYSCS_UTIL.SYSCS_UPDATE_STATISTICS too, and I'm pretty sure
there are test cases for that system procedure.

Might be worth checking by adding a println() statement to the method
and seeing if anything gets printed when running
AutomaticIndexStatisticsTest or AutomaticIndexStatisticsMultiTest.

> Or is this class a good candidate for adding additional tests to
> improve our test coverage?

If the coverage report is correct, I'd say it's definitely worth trying
to improve it. It's worth keeping in mind that tests for the index
statistics daemon are very timing sensitive, since they don't have
direct control over when the daemon thread actually runs. It took a
while before the current tests ran without generating noise in the
nightly tests, so it likely that adding more tests for this code will
involve spending much time tracking down intermittent timing bugs in the


Knut Anders

View raw message