Last modified: 2013-12-05 09:51:46 UTC
When testing on PostgreSQL: 3) ApiQueryBasicTest::testGenerator Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'AQBT-All' +'AQBT-Categories' /usr/home/saper/test/mytest/tests/phpunit/includes/api/query/ApiQueryTestBase.php:143 /usr/home/saper/test/mytest/tests/phpunit/includes/api/query/ApiQueryTestBase.php:141 /usr/home/saper/test/mytest/tests/phpunit/includes/api/query/ApiQueryTestBase.php:141 /usr/home/saper/test/mytest/tests/phpunit/includes/api/query/ApiQueryTestBase.php:141 /usr/home/saper/test/mytest/tests/phpunit/includes/api/query/ApiQueryTestBase.php:105 /usr/home/saper/test/mytest/tests/phpunit/includes/api/query/ApiQueryTestBase.php:100 /usr/home/saper/test/mytest/tests/phpunit/includes/api/query/ApiQueryBasicTest.php:299 /usr/home/saper/test/mytest/tests/phpunit/MediaWikiTestCase.php:123 /usr/home/saper/test/mytest/tests/phpunit/MediaWikiPHPUnitCommand.php:80 /usr/home/saper/test/mytest/tests/phpunit/MediaWikiPHPUnitCommand.php:64 /usr/home/saper/test/mytest/tests/phpunit/phpunit.php:119 Looks like that list of pages returned by API is okay, only the order is different: Request: generator=links&titles=AQBT-Links&action=query Expected: Array ( [query] => Array ( [pages] => Array ( [1] => Array ( [pageid] => 1 [ns] => 0 [title] => AQBT-All ) [2] => Array ( [pageid] => 2 [ns] => 0 [title] => AQBT-Categories ) [4] => Array ( [pageid] => 4 [ns] => 0 [title] => AQBT-Templates ) ) ) ) Result: Array ( [query] => Array ( [pages] => Array ( [109] => Array ( [pageid] => 109 [ns] => 0 [title] => AQBT-Categories ) [108] => Array ( [pageid] => 108 [ns] => 0 [title] => AQBT-All ) [111] => Array ( [pageid] => 111 [ns] => 0 [title] => AQBT-Templates ) ) ) ) Not sure if order of page titles returned by API should be guaranteed? Should we test for it?
I suspect that the rewrite of the assertResult function in Gerrit change #99156 may have fixed this too. Could you check that?
Yes, gerrit charge 99156 made output of all seven tests of tests/phpunit/includes/api/query/ApiQueryBasicTest.php suspiciously green :)
Thanks for quick action!