* Introduce new hooks which allow BacklinkCache to handle non-core tables
* Make table name a parameter to RefreshLinks2 job (instead of hardcoded templatelinks)
Breaks unit tests as below, not going to be able to fix them before I disappear for the evening, so might aswell leave trunk clean
ArticleTablesTest testbug14404
Error:
ArticleTablesTest::testbug14404
Undefined offset: 0
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/includes/ArticleTablesTest.php:31
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/MediaWikiTestCase.php:60
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/MediaWikiPHPUnitCommand.php:20
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/phpunit.php:60
ParserTests testParserTest #552 - testParserTest with data set #551
Failure:
ParserTests::testParserTest with data set #551 ('RAW magic word', '{{RAW:QUERTY}}', '<p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
</p>', '', '')
RAW magic word
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-<p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
+<p><a href="/index.php?title=Template:RAW:QUERTY&action=edit&redlink=1" class="new" title="Template:RAW:QUERTY (page does not exist)">Template:RAW:QUERTY</a>
</p>
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/includes/parser/NewParserTest.php:545
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/MediaWikiTestCase.php:60
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/MediaWikiPHPUnitCommand.php:20
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/phpunit.php:60
yet to new conventions.
Hopefully I got the syntax right for the OR thing using mw's db functions (I tested the query, its fine, I'm just not 100% sure thats the most correct way using mw's db funcs, I've never really had to build an OR query using the db funcs).
some extranous backlinks for the redirect table (if there happened to be a page redirecting
to an interwiki page with the same name plus an interwiki prefix).
Not a major issue since this is really only used as far as i can tell, to purge squids and html file cache.
A couple of extra unneeded purges shouldn't hurt anything, just a bit pointless.
= BacklinkCache.php =
* BacklinkCache class
** Set a few otherwise unset varables ($wgContLang & $wgMemc in
BacklinkCache)
= testHelpers.inc =
* TectRecorder class
** TestRecorder::record() accept and use a recorder object
** change TestFileIterator::setParser use a MediaWikiParserTest instead
of ParserTest
= parserTest.inc =
* ParserTest class
** Make $ParserTest->regex and $ParsaerTest->savedGlobals member
variables available to stop warnings.
** Force ParserTest::$showProgress and $showFailure to false
** Set ParserTest::$uploadDir on time
** Move ParserTest::chomp() and addArticle() to bootstrap for
MediaWikiTestSetup.
** Update ParserTest::runTest so that Success and Failure are reported
via reporter->showsTestResult() or ParserTestSuiteBackend::show*()
as needed.
** Set $ParserTest->uploadDir with setupUploadDir()
** Change ParserTest->setupGlobals() so that $wgDBprefix doesn't get
to set to the “parsertest_” bits.
** Sprinkle $this->teardownGlobals() at exit points in
ParserTest->teardownDatabase()
= bootstrap.php =
* MediaWikiTestSetup class
** Make member variables MediaWikiTestSetup::$suite,
MediaW* Make member variables MediaWikiTestSetup::$suite,
MediaWikiTestSetup::$regex, MediaWikiTestSetup::$runDisabled
available.
* Setup a constructor MediaWikiTestSetup that accepts an optional
PHPUnit_Framework_TestSuite so they can use PHPUnit.
* Change MediaWikiParserTest so that it is derived from
MediaWikiTestSetup instead of PHPUnit_Framework_TestSuite
* Make MediaWikiParserTest create a PHPUnit_Framework_TestSuite for
the parser tests and pass it to the new parent (MediaWikiTestSetup)
as the PHPUnit testsuite.
* Replace MediaWikiParserTest->run() with MediaWikiParserTest::suite()
so that the tests can be loaded into a suite and then run with
PHPUnit's test runner.
= ParserHelpers.php =
* ParserUnitTest class
** Force run() $backend to use ParserTestSuiteBackend instead of
trying to get the backend from the suite member.
** Use ParserTest::runTest() instead of
ParserikiTestSetup::$regex, MediaWikiTestSetup::$runDisabled
available.
** Setup a constructor MediaWikiTestSetup that accepts an optional
PHPUnit_Framework_TestSuite so they can use PHPUnit.
** Change MediaWikiParserTest so that it is derived from
MediaWikiTestSetup instead of PHPUnit_Framework_TestSuite
** Make MediaWikiParserTest create a PHPUnit_Framework_TestSuite for
the parser tests and pass it to the new parent (MediaWikiTestSetup)
as the PHPUnit testsuite.
** Replace MediaWikiParserTest->run() with MediaWikiParserTest::suite()
so that the tests can be loaded into a suite and then run with
PHPUnit's test runner.
= ParserHelpers.php =
* ParserUnitTest class
** Force run() $backend to use ParserTestSuiteBackend instead of
trying to get the backend from the suite member.
** Use ParserTest::runTest() instead of
ParserTestSuiteBackend::runTest()
* ParserTestSuiteBackend class
** extends PHPUnit_FrameWork_TestSuite instead of ParserTest
** Add member variables $recorder, $term, and $usePHPUnit
** Add a constructor that determines if PHPUnit is usewd.
** Add a method showTestResult() that can be used to show success or
failure
** Change showSucess and showFailure() to be static and use identical
arguments and only use PHPUnit_Framework_Assert::assertEquals
when PHPUnit is in use.
= SearchEngineTest.php =
** Fix path in require to bootstrap.php
* r41081 was causing the job queue to be flooded with tiny htmlCacheUpdate jobs which were less than the batch size and so, according to the original logic, should have been done immediately. This was causing template updates to be delayed even when the template has few backlinks. This is fixed.
* Introduced a shared cache called BacklinkCache with the main purpose of sharing data from these backlink queries, thus recovering the performance of r41081.
* Refactored backlink partitioning code, which in r40741 was copied from HTMLCacheUpdate to LinksUpdate with a bug intact. The bug caused every htmlCacheUpdate or refreshLinks2 job to be split into at least two pieces even when number of rows is less than the batch size.
* Fixed a bug from r40741 causing refreshLinks2 jobs with end=false to be ignored.
* Made SquidUpdate::newFromTitles() accept a TitleArray