Page MenuHomePhabricator

EchoTitleLocalCacheTest::testGet fails when tests are run with other extensions
Closed, ResolvedPublic

Description

When running Echo extensions tests under HHVM/Zend, Jenkins ends up with a failure:

1) EchoTitleLocalCacheTest::testGet
Failed asserting that null is an instance of class "Title".

extensions/Echo/tests/phpunit/includes/cache/TitleLocalCacheTest.php:37
tests/phpunit/MediaWikiTestCase.php:141

In a workspace with the following extensions:

mediawiki/extensions/Echo
mediawiki/extensions/JsonConfig
mediawiki/extensions/Mantle
mediawiki/extensions/MobileApp
mediawiki/extensions/MobileFrontend
mediawiki/extensions/VisualEditor
mediawiki/extensions/WikiGrok
mediawiki/extensions/ZeroBanner
mediawiki/extensions/ZeroPortal

Running the Echo tests standalone pass ( php tests/phpunit/phpunit.php extensions/Echo )

The whole testsuite fails though:

cd tests/phpunit
php phpunit.php --testsuite extensions

Or slightly faster:

cd tests/phpunit
php phpunit.php --testsuite extensions --filter 'Echo' --stop-on-failure

Event Timeline

hashar created this task.Dec 15 2014, 8:43 PM
hashar raised the priority of this task from to Needs Triage.
hashar updated the task description. (Show Details)
hashar added projects: Notifications, HHVM.
hashar changed Security from none to None.
hashar added a subscriber: hashar.
hashar updated the task description. (Show Details)Dec 15 2014, 8:46 PM
Mattflaschen-WMF triaged this task as Unbreak Now! priority.Dec 15 2014, 11:49 PM

You can trigger the hhvm job on an Echo proposed patch by commenting in Gerrit: "check experimental". That will run a build of https://integration.wikimedia.org/ci/job/mwext-Echo-testextension-hhvm/

Spage removed Spage as the assignee of this task.Jan 5 2015, 9:57 PM
Spage added a subscriber: Spage.

I couldn't get MediaWiki-Vagrant to work to reproduce this.

hashar closed this task as Resolved.Jan 6 2015, 1:40 PM
hashar claimed this task.

The standalone job pass now https://integration.wikimedia.org/ci/job/mwext-Echo-testextension-hhvm/3/ but fails when being run with other extensions https://integration.wikimedia.org/ci/job/mediawiki-phpunit-integration-hhvm/11/console

That last job uses:

mediawiki/extensions/Echo
mediawiki/extensions/JsonConfig
mediawiki/extensions/Mantle
mediawiki/extensions/MobileApp
mediawiki/extensions/MobileFrontend
mediawiki/extensions/VisualEditor
mediawiki/extensions/WikiGrok
mediawiki/extensions/ZeroBanner
mediawiki/extensions/ZeroPortal

I can reproduce the failure on my local install using Zend

hashar renamed this task from EchoTitleLocalCacheTest::testGet fails under HHVM to EchoTitleLocalCacheTest::testGet fails when tests are run with other extensions.Jan 6 2015, 1:53 PM
hashar updated the task description. (Show Details)
hashar added a comment.Jan 6 2015, 3:14 PM

Example to reproduce:

cd tests/phpunit
php phpunit.php --testsuite extensions --filter 'Echo' --stop-on-failure

There must be a race condition somewhere in the MRU Cache or Title local cache.

hashar reopened this task as Open.Jan 8 2015, 10:10 AM

I forgot to reopen this task, see above for a way to reproduce.

Could someone from the Collaboration-Team-Triage assist in tracking down this bug? I have looked a bit at the cache code and attempted to debug it but eventually got lost in the code :-/

The way to reproduce:

Clone core / vendor and:

mediawiki/extensions/Echo
mediawiki/extensions/JsonConfig
mediawiki/extensions/Mantle
mediawiki/extensions/MobileApp
mediawiki/extensions/MobileFrontend
mediawiki/extensions/VisualEditor
mediawiki/extensions/WikiGrok
mediawiki/extensions/ZeroBanner
mediawiki/extensions/ZeroPortal

Setup a basic wiki via maintenance/install.php

cd tests/phpunit
php phpunit.php --testsuite extensions --filter 'Echo' --stop-on-failure

Should fails.

If one only run the Echo tests they pass ( php tests/phpunit.php extensions/Echo ).

DannyH renamed this task from EchoTitleLocalCacheTest::testGet fails when tests are run with other extensions to EchoTitleLocalCacheTest::testGet fails when tests are run with other extensions (Unbreak Now).Jan 8 2015, 6:50 PM
Mattflaschen-WMF removed hashar as the assignee of this task.Jan 8 2015, 7:25 PM

Change 183840 had a related patch set uploaded (by Hashar):
Fix EchoTitleLocalCacheTest::testGet corner case

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

Patch-For-Review

hashar added a comment.Jan 9 2015, 1:36 PM

The patch 183840 for Echo does fix the job testing multiple extensions together:

https://integration.wikimedia.org/ci/job/mediawiki-phpunit-integration-hhvm/15/console

Pending review/merge.

Change 183840 merged by jenkins-bot:
Fix EchoTitleLocalCacheTest::testGet corner case

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

hashar closed this task as Resolved.Jan 9 2015, 3:32 PM
hashar claimed this task.

Merged in by Matthias \O/

Change 184343 had a related patch set uploaded (by Hashar):
Fix EchoTitleLocalCacheTest::testGet corner case

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

Patch-For-Review

Change 184344 had a related patch set uploaded (by Hashar):
Fix EchoTitleLocalCacheTest::testGet corner case

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

Patch-For-Review

Change 184343 merged by jenkins-bot:
Fix EchoTitleLocalCacheTest::testGet corner case

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

Change 184344 merged by jenkins-bot:
Fix EchoTitleLocalCacheTest::testGet corner case

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

I have pushed the fix to 1.25wmf13 and 1.25wmf14 mediawiki/core branches (and "deployed").

Change 184420 had a related patch set uploaded (by Hashar):
Fix EchoTitleLocalCacheTest::testGet corner case

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

Patch-For-Review

Change 184420 abandoned by Hashar:
Fix EchoTitleLocalCacheTest::testGet corner case

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

Krinkle reopened this task as Open.Jan 29 2015, 11:48 PM
Mattflaschen-WMF renamed this task from EchoTitleLocalCacheTest::testGet fails when tests are run with other extensions (Unbreak Now) to EchoTitleLocalCacheTest::testGet fails when tests are run with other extensions.Jan 30 2015, 12:51 AM
Mattflaschen-WMF added a subscriber: EBernhardson.
Krinkle closed this task as Resolved.EditedJan 30 2015, 12:51 AM

Filed separately as T88039 since that one is not related to HHVM.

Krinkle reopened this task as Open.Jan 30 2015, 12:52 AM
Mattflaschen-WMF closed this task as Resolved.Jan 30 2015, 12:59 AM
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptAug 12 2016, 11:54 AM