Improve flaky SiteStatsTest
authorBrad Jorsch <bjorsch@wikimedia.org>
Tue, 12 Sep 2017 15:48:41 +0000 (11:48 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Tue, 12 Sep 2017 15:48:41 +0000 (11:48 -0400)
commitd0b093d4bdc5d28eda5d37f5163f0694bd189234
tree778c8eab73af2c3f69ab5c4d2e23e568b96b8687
parentca0f89b6249ce7e17807d4a85541b014da2fa0db
Improve flaky SiteStatsTest

SiteStatsTest::testJobsCountGetCached() is somewhat flaky in that if it
runs after a test that adds a page (thereby producing htmlCacheUpdate
and recentChangesUpdate jobs) but doesn't have the CI framework reset
the `page` tables (which has the side effect of clearing all such jobs),
it will fail.

This change manually clears those jobs so it doesn't depend on test
ordering.

Change-Id: I1277e633c81b29bda7564fa12d23f13ded7298c7
tests/phpunit/includes/SiteStatsTest.php