Page MenuHomePhabricator

Parsoid CI broken by Rest\Handler\LanguageLinksHandlerTest
Closed, ResolvedPublic

Description

Fails on all Parsoid patches, for example this NO-OP patch.
From https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php72-noselenium-docker/56133/console for example.

....
17:03:05 1) MediaWiki\Tests\Rest\Handler\LanguageLinksHandlerTest::testExecute
17:03:05 Failed asserting that actual size 1 matches expected size 2.
17:03:05 
17:03:05 /workspace/src/tests/phpunit/integration/includes/Rest/Handler/LanguageLinksHandlerTest.php:82
17:03:05 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:437
17:03:05 /workspace/src/maintenance/doMaintenance.php:106
....

Event Timeline

Does Parsoid mess around with inter wiki table in its tests?

Yes, the Parser test runner setup creates its own interwiki table (using wgInterwikiCache) so that test results are not dependent on the host wiki configuration.

Related Q: how can we make code CI run your test suite so that it doesn't just break Parsoid CI? Core CI *does* run some tests in a mode where Parsoid is installed -- can we add your tests to that group?

Change 654660 had a related patch set uploaded (by Ppchelko; owner: Ppchelko):
[mediawiki/core@master] LanguageLinksHandlerTest: reset iw table for more robustness

https://gerrit.wikimedia.org/r/654660

Related Q: how can we make code CI run your test suite so that it doesn't just break Parsoid CI? Core CI *does* run some tests in a mode where Parsoid is installed -- can we add your tests to that group?

This test is run in core CI as well, but it passes. It also passes when Parsoid is installed. In his case I guess parsoid messes up the IW table for this test. Let's see if my patch above helps.

Change 654679 had a related patch set uploaded (by C. Scott Ananian; owner: Ppchelko):
[mediawiki/core@master] LanguageLinksHandlerTest: use wgInterwikiCache instead of mutating database

https://gerrit.wikimedia.org/r/654679

Change 654660 abandoned by Ppchelko:
[mediawiki/core@master] LanguageLinksHandlerTest: clean up interwiki table after mutation by test

Reason:
Superseded by Id1899a89ae6b55e7032befe73990d215370828d8

https://gerrit.wikimedia.org/r/654660

Change 654679 abandoned by C. Scott Ananian:
[mediawiki/core@master] LanguageLinksHandlerTest: use wgInterwikiCache instead of mutating database

Reason:
Abandoned in favor of Id1899a89ae6b55e7032befe73990d215370828d8

https://gerrit.wikimedia.org/r/654679

Change 654679 restored by C. Scott Ananian:
[mediawiki/core@master] LanguageLinksHandlerTest: use wgInterwikiCache instead of mutating database

https://gerrit.wikimedia.org/r/654679

Change 654679 merged by jenkins-bot:
[mediawiki/core@master] LanguageLinksHandlerTest: use wgInterwikiCache instead of mutating database

https://gerrit.wikimedia.org/r/654679

ssastry assigned this task to Pchelolo.