Page MenuHomePhabricator

EchoDiscussionParserTest fails sometimes when run with proposed new DB test infrastructure.
Closed, ResolvedPublic

Description

I'm proposing to refactor the code that handles database cloning for unit tests, see I37b8e801. Jenkins tests on that change "sometimes" fail due to EchoDiscussionParserTest:

18:09:14 1) EchoDiscussionParserTest::testGenerateEventsForRevision with data set #0 (637638133, 637637213, 'Cwobeel', 'en', array('[[User:{{{1}}}|{{<includeonly...clude>'), 'UTPage', array(array('mention', 'Cwobeel')))
18:09:14 MWException: CAS update failed on user_touched for user ID '2' (read from slave); the version of the user to be saved is older than the current version.
18:09:14 
18:09:14 /mnt/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/includes/user/User.php:3793
18:09:14 /mnt/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/extensions/Echo/tests/phpunit/DiscussionParserTest.php:149
18:09:14 /mnt/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/tests/phpunit/MediaWikiTestCase.php:214

I'm not sure how to try and reproduce this locally. Also, this fails often, but not always, so it seems timing related.

This is blocking work on the proposed dependency injection infrastructure, T124792.

One instance: https://integration.wikimedia.org/ci/job/mediawiki-extensions-hhvm/56723/consoleFull
Another instance: https://integration.wikimedia.org/ci/job/mediawiki-extensions-hhvm/56724/consoleFull

Details

Related Gerrit Patches:

Event Timeline

daniel created this task.Mar 29 2016, 6:14 PM
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptMar 29 2016, 6:14 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
daniel updated the task description. (Show Details)Mar 29 2016, 6:15 PM
daniel updated the task description. (Show Details)
daniel updated the task description. (Show Details)Mar 29 2016, 6:17 PM

Another occurrance:

18:03:38 1) ApiEchoMarkReadTest::testMarkReadWithList
18:03:38 MWException: CAS update failed on user_touched for user ID '2' (read from slave); the version of the user to be saved is older than the current version.
18:03:38
18:03:38 /mnt/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/includes/user/User.php:3931
18:03:38 /mnt/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/tests/phpunit/includes/TestUser.php:83
18:03:38 /mnt/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/tests/phpunit/includes/api/ApiTestCase.php:30
18:03:38 /mnt/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/extensions/Echo/tests/phpunit/api/ApiEchoMarkReadTest.php:11
18:03:38 /mnt/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/tests/phpunit/MediaWikiTestCase.php:370

Change 289647 had a related patch set uploaded (by Daniel Kinzler):
Disable CAS check when saving TestUser data.

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

Change 289651 had a related patch set uploaded (by Daniel Kinzler):
Disable CAS check when saving User settings in tests.

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

Change 289647 merged by jenkins-bot:
Disable CAS check when saving TestUser data.

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

Krinkle closed this task as Resolved.Apr 13 2018, 8:32 PM
Krinkle claimed this task.

Change 289651 abandoned by Daniel Kinzler:
Disable CAS check when saving User settings in tests.

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

Restricted Application added a project: Growth-Team. · View Herald TranscriptSep 28 2018, 4:28 PM
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:11 PM
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptAug 28 2019, 11:11 PM