Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MW 1.32+, MCR breaks move tests #3395

Closed
mwjames opened this issue Sep 2, 2018 · 1 comment · May be fixed by #3396
Closed

MW 1.32+, MCR breaks move tests #3395

mwjames opened this issue Sep 2, 2018 · 1 comment · May be fixed by #3396

Comments

@mwjames
Copy link
Contributor

mwjames commented Sep 2, 2018

Setup and configuration

  • SMW version: all
  • MW version: 1.32+
  • PHP version: any
  • DB system (MySQL, Blazegraph, etc.) and version: any

Issue

The [0] change (using bisect, anything before that change passes those tests) causes two of our move tests [1] to fail.

--
There were 2 failures:
1) SMW\Tests\Integration\JSONScript\JsonTestCaseScriptRunnerTest::testCaseFile with data set "p-0901.json" ('/home/travis/build/SemanticMe...1.json')
Failed "#0 includes move" for StringContains:
==== (actual) ====
<div class="mw-parser-output"><ul class="smw-format ul-format"><li class="smw-row"><span class="smw-field"><span class="smw-value">Page/09/01/1</span></span></li><li class="smw-row"><span class="smw-field"><span class="smw-value">Page/09/01/2</span></span></li></ul>
</div>
==== (expected) ====
[ <li class="smw-row"><span class="smw-field"><span class="smw-value">Move/09/01/4</span></span></li> ]
Failed asserting that 2 matches expected 3.
/home/travis/build/SemanticMediaWiki/mw/extensions/SemanticMediaWiki/tests/phpunit/Utils/Validators/StringValidator.php:81
/home/travis/build/SemanticMediaWiki/mw/extensions/SemanticMediaWiki/tests/phpunit/Utils/Validators/StringValidator.php:30
/home/travis/build/SemanticMediaWiki/mw/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/ParserTestCaseProcessor.php:185
/home/travis/build/SemanticMediaWiki/mw/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/ParserTestCaseProcessor.php:96
/home/travis/build/SemanticMediaWiki/mw/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/JsonTestCaseScriptRunnerTest.php:371
/home/travis/build/SemanticMediaWiki/mw/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/JsonTestCaseScriptRunnerTest.php:207
/home/travis/build/SemanticMediaWiki/mw/extensions/SemanticMediaWiki/tests/phpunit/JsonTestCaseScriptRunner.php:215
/home/travis/build/SemanticMediaWiki/mw/extensions/SemanticMediaWiki/tests/phpunit/DatabaseTestCase.php:133
/home/travis/build/SemanticMediaWiki/mw/maintenance/doMaintenance.php:94

2) SMW\Tests\Integration\MediaWiki\Hooks\TitleMoveCompleteIntegrationTest::testPageMoveWithRemovalOfOldPage
Failed asserting that actual size 0 matches expected size 1.
/home/travis/build/SemanticMediaWiki/mw/extensions/SemanticMediaWiki/tests/phpunit/Integration/MediaWiki/Hooks/TitleMoveCompleteIntegrationTest.php:160
/home/travis/build/SemanticMediaWiki/mw/extensions/SemanticMediaWiki/tests/phpunit/DatabaseTestCase.php:133
/home/travis/build/SemanticMediaWiki/mw/maintenance/doMaintenance.php:94

Steps to reproduce

Run the tests before and after the change

Cause

I spend 2h to investigate the cause and I can see that the ParserOutput::getExtensionData holds an old record (in our case I compared the Title objects) where the moved Title doesn't align with the referenced Title from the ParserOutput and with that tests fail as a consequence because the data we retrieve from ParserOutput::getExtensionData are suddenly (starting with [0]) inconsistent.

refs #2905

[0] wikimedia/mediawiki@a335774
[1] https://travis-ci.org/SemanticMediaWiki/SemanticMediaWiki/jobs/423454960

@mwjames
Copy link
Contributor Author

mwjames commented Sep 8, 2018

Fixed (during the week) by either:

@mwjames mwjames closed this as completed Sep 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant