Page MenuHomePhabricator

Test failures for ApiEditPageTest::testEditAbortedByHook and ApiEditPageTest::testEditAbortedByHookWithCustomOutput
Closed, InvalidPublic

Description

See: https://integration.wikimedia.org/ci/job/mediawiki-quibble-composer-mysql-php70-docker/21842/console

23:04:56 There were 2 failures:
23:04:56 
23:04:56 1) ApiEditPageTest::testEditAbortedByHook
23:04:56 === Logs generated by test case
23:04:56 [caches] [info] LocalisationCache: using store LCStoreNull {"private":false}
23:04:56 [deprecated] [info] Use of APIEditBeforeSave hook (used in hook-APIEditBeforeSave-closure) is deprecated. [Called from ApiEditPageTest::testEditAbortedByHook in /workspace/src/tests/phpunit/includes/api/ApiEditPageTest.php at line 1394] {"private":true}
23:04:56 [wfDebug] [debug] IP: 127.0.0.1 {"private":false}
23:04:56 [wfDebug] [debug] LocalisationCache::isExpired(en): cache missing, need to make one {"private":false}
23:04:56 [wfDebug] [debug] LocalisationCache::recache: got localisation for en from source {"private":false}
23:04:56 [wfDebug] [debug] User::getBlockedStatus: checking... {"private":false}
23:04:56 [wfDebug] [debug] User: loading options for user 1 from override cache. {"private":false}
23:04:56 [wfDebug] [debug] EditPage::importFormData: Form data appears to be incomplete {"private":false}
23:04:56 [wfDebug] [debug] POST DATA: array (
23:04:56 ) {"private":false}
23:04:56 [caches] [info] parser: HashBagOStuff {"private":false}
23:04:56 [wfDebug] [debug] ParserFactory: using preprocessor: Preprocessor_Hash {"private":false}
23:04:56 [objectcache] [info] Rejected set() for {cachekey} due to pending writes. {"cachekey":"global:NameTableSqlStore:content_models:wikidb-unittest_"}
23:04:56 [objectcache] [info] Rejected set() for {cachekey} due to pending writes. {"cachekey":"global:NameTableSqlStore:slot_roles:wikidb-unittest_"}
23:04:56 [wfDebug] [debug] IP: 127.0.0.1 {"private":false}
23:04:56 [SaveParse] [debug] MediaWiki\Revision\RenderedRevision::outputVariesOnRevisionMetaData: Keeping prepared output... []
23:04:56 [SaveParse] [debug] MediaWiki\Revision\RenderedRevision::outputVariesOnRevisionMetaData: Keeping prepared output... []
23:04:56 [wfDebug] [debug] Saved in parser cache with key wikidb-unittest_:pcache:idhash:91-0!canonical and timestamp 20190701220303 and revision id 157 {"private":false}
23:04:56 [wfDebug] [debug] BacklinkCache::queryLinks: got results from DB {"private":false}
23:04:56 [wfDebug] [debug] Title::getRestrictionTypes: applicable restrictions to [[Help:TestEditAbortedByHook]] are {edit,move} {"private":false}
23:04:56 [squid] [info] CdnCacheUpdate::purge: http://6b2e32cee5be/index.php/Help_talk:TestEditAbortedByHook http://6b2e32cee5be/index.php?title=Help_talk:TestEditAbortedByHook&action=history http://6b2e32cee5be/index.php/Help:TestEditAbortedByHook http://6b2e32cee5be/index.php?title=Help:TestEditAbortedByHook&action=history {"private":false}
23:04:56 [caches] [info] LocalisationCache: using store LCStoreNull {"private":false}
23:04:56 ===
23:04:56 Failed asserting that true is false.
23:04:56 
23:04:56 /workspace/src/tests/phpunit/includes/api/ApiEditPageTest.php:1409
23:04:56 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:448
23:04:56 /workspace/src/maintenance/doMaintenance.php:99
23:04:56 
23:04:56 2) ApiEditPageTest::testEditAbortedByHookWithCustomOutput
23:04:56 === Logs generated by test case
23:04:56 [caches] [info] LocalisationCache: using store LCStoreNull {"private":false}
23:04:56 [deprecated] [info] Use of APIEditBeforeSave hook (used in hook-APIEditBeforeSave-closure) is deprecated. [Called from ApiEditPageTest::testEditAbortedByHookWithCustomOutput in /workspace/src/tests/phpunit/includes/api/ApiEditPageTest.php at line 1417] {"private":true}
23:04:56 [wfDebug] [debug] IP: 127.0.0.1 {"private":false}
23:04:56 [wfDebug] [debug] LocalisationCache::isExpired(en): cache missing, need to make one {"private":false}
23:04:56 [wfDebug] [debug] LocalisationCache::recache: got localisation for en from source {"private":false}
23:04:56 [wfDebug] [debug] User::getBlockedStatus: checking... {"private":false}
23:04:56 [wfDebug] [debug] User: loading options for user 1 from override cache. {"private":false}
23:04:56 [wfDebug] [debug] EditPage::importFormData: Form data appears to be incomplete {"private":false}
23:04:56 [wfDebug] [debug] POST DATA: array (
23:04:56 ) {"private":false}
23:04:56 [caches] [info] parser: HashBagOStuff {"private":false}
23:04:56 [wfDebug] [debug] ParserFactory: using preprocessor: Preprocessor_Hash {"private":false}
23:04:56 [objectcache] [info] Rejected set() for {cachekey} due to pending writes. {"cachekey":"global:NameTableSqlStore:content_models:wikidb-unittest_"}
23:04:56 [objectcache] [info] Rejected set() for {cachekey} due to pending writes. {"cachekey":"global:NameTableSqlStore:slot_roles:wikidb-unittest_"}
23:04:56 [wfDebug] [debug] IP: 127.0.0.1 {"private":false}
23:04:56 [SaveParse] [debug] MediaWiki\Revision\RenderedRevision::outputVariesOnRevisionMetaData: Keeping prepared output... []
23:04:56 [SaveParse] [debug] MediaWiki\Revision\RenderedRevision::outputVariesOnRevisionMetaData: Keeping prepared output... []
23:04:56 [wfDebug] [debug] Saved in parser cache with key wikidb-unittest_:pcache:idhash:92-0!canonical and timestamp 20190701220303 and revision id 158 {"private":false}
23:04:56 [wfDebug] [debug] BacklinkCache::queryLinks: got results from DB {"private":false}
23:04:56 [wfDebug] [debug] Title::getRestrictionTypes: applicable restrictions to [[Help:TestEditAbortedByHookWithCustomOutput]] are {edit,move} {"private":false}
23:04:56 [squid] [info] CdnCacheUpdate::purge: http://6b2e32cee5be/index.php/Help_talk:TestEditAbortedByHookWithCustomOutput http://6b2e32cee5be/index.php?title=Help_talk:TestEditAbortedByHookWithCustomOutput&action=history http://6b2e32cee5be/index.php/Help:TestEditAbortedByHookWithCustomOutput http://6b2e32cee5be/index.php?title=Help:TestEditAbortedByHookWithCustomOutput&action=history {"private":false}
23:04:56 [caches] [info] LocalisationCache: using store LCStoreNull {"private":false}
23:04:56 ===
23:04:56 Failed asserting that Array &0 (
23:04:56     'new' => true
23:04:56     'result' => 'Success'
23:04:56     'pageid' => 92
23:04:56     'title' => 'Help:TestEditAbortedByHookWithCustomOutput'
23:04:56     'contentmodel' => 'wikitext'
23:04:56     'oldrevid' => 0
23:04:56     'newrevid' => 158
23:04:56     'newtimestamp' => '2019-07-01T22:03:03Z'
23:04:56 ) is identical to Array &0 (
23:04:56     'msg' => 'Some message'
23:04:56     'result' => 'Failure'
23:04:56 ).
23:04:56 
23:04:56 /workspace/src/tests/phpunit/includes/api/ApiEditPageTest.php:1433
23:04:56 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:448
23:04:56 /workspace/src/maintenance/doMaintenance.php:99
23:04:56 
23:04:56 FAILURES!
23:04:56 Tests: 7992, Assertions: 49582, Failures: 2, Skipped: 9.

Affected patches: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/518006, https://gerrit.wikimedia.org/r/c/mediawiki/core/+/507274

Event Timeline

xSavitar renamed this task from Build failure with error "You should really fix these slow tests (>50ms)..." to API related test failures with error "You should really fix these slow tests (>50ms)...".Jul 2 2019, 2:05 PM
xSavitar removed a project: Multi-Content-Revisions.
xSavitar updated the task description. (Show Details)

The message "You should really fix these slow tests" is not a failure, it is unrelated. It is informative about tests that are successful but took a long time in CI, and can be improved.

Krinkle renamed this task from API related test failures with error "You should really fix these slow tests (>50ms)..." to Test failures for ApiEditPageTest::testEditAbortedByHook and ApiEditPageTest::testEditAbortedByHookWithCustomOutput.Jul 2 2019, 2:42 PM
Krinkle removed a project: ApiFeatureUsage.

@D3r1ck01 We're trying to understand why this might be a problem with CI rather than with the patches themselves. Could you elaborate on a little?

@WDoranWMF, still trying to investigate the issue in depth. For a patch like: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/518006, I don't see any relation between the patch and the failures. Try to investigate for the other patch.

The message "You should really fix these slow tests" is not a failure, it is unrelated. It is informative about tests that are successful but took a long time in CI, and can be improved.

Okay, makes sense. Thanks!

xSavitar closed this task as Invalid.EditedJul 2 2019, 8:24 PM

I think I found the problem and it's related to the patch. Due to a rebase (I think), those tests got into the patch: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/518006/9/tests/phpunit/includes/api/ApiEditPageTest.php#1387, which is not there in master: https://github.com/wikimedia/mediawiki/blob/b95a76ae9ecace5772989995a9a6d7e11fb1fdc6/tests/phpunit/includes/api/ApiEditPageTest.php

Hence, marking as no longer valid.