Page MenuHomePhabricator

Wikibase Scribunto tests are failing, with the tests depending on configuration
Closed, ResolvedPublic

Description

Wikibase Scribunto tests are failing suddenly since yesterday:

the tests now expect luasandbox, and seem to depend on configuration.

14:35:38 There were 4 failures:
14:35:38 
14:35:38 1) LuaSandbox: Wikibase\Client\Tests\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibraryTest::testRegister
14:35:38 Failed asserting that LuaSandboxFunction Object () is an instance of class "Scribunto_LuaStandaloneInterpreterFunction".
14:35:38 
14:35:38 /mnt/jenkins-workspace/workspace/mwext-testextension-php55-composer/src/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibraryTest.php:77
14:35:38 /mnt/jenkins-workspace/workspace/mwext-testextension-php55-composer/src/tests/phpunit/MediaWikiTestCase.php:147
14:35:38 
14:35:38 2) LuaStandalone: Wikibase\Client\Tests\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibraryTest::testRegister
14:35:38 Failed asserting that LuaSandboxFunction Object () is an instance of class "Scribunto_LuaStandaloneInterpreterFunction".
14:35:38 
14:35:38 /mnt/jenkins-workspace/workspace/mwext-testextension-php55-composer/src/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibraryTest.php:77
14:35:38 /mnt/jenkins-workspace/workspace/mwext-testextension-php55-composer/src/tests/phpunit/MediaWikiTestCase.php:147
14:35:38 
14:35:38 3) LuaSandbox: Wikibase\Client\Tests\DataAccess\Scribunto\Scribunto_LuaWikibaseLibraryTest::testRegister
14:35:38 Failed asserting that LuaSandboxFunction Object () is an instance of class "Scribunto_LuaStandaloneInterpreterFunction".
14:35:38 
14:35:38 /mnt/jenkins-workspace/workspace/mwext-testextension-php55-composer/src/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTest.php:88
14:35:38 /mnt/jenkins-workspace/workspace/mwext-testextension-php55-composer/src/tests/phpunit/MediaWikiTestCase.php:147
14:35:38 
14:35:38 4) LuaStandalone: Wikibase\Client\Tests\DataAccess\Scribunto\Scribunto_LuaWikibaseLibraryTest::testRegister
14:35:38 Failed asserting that LuaSandboxFunction Object () is an instance of class "Scribunto_LuaStandaloneInterpreterFunction".
14:35:38 
14:35:38 /mnt/jenkins-workspace/workspace/mwext-testextension-php55-composer/src/extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTest.php:88
14:35:38 /mnt/jenkins-workspace/workspace/mwext-testextension-php55-composer/src/tests/phpunit/MediaWikiTestCase.php:147
14:35:38 
14:35:38 --

I think http://git.wikimedia.org/commitdiff/integration%2Fjenkins.git/d7bdc8f1a77eec58832bad3684b6c01e6720a639 is what has triggered the failures. That change is good, but we need to improve the tests so they don't depend on configuration like this.

Event Timeline

aude triaged this task as Unbreak Now! priority.Feb 26 2016, 3:08 PM

this is causing anything depending on the wikidata build to fail, such as ContentTranslation, and is causing Wikibase tests to also fail

Change 273460 had a related patch set uploaded (by Aude):
Revert "mediawiki.conf: Set $wgScribuntoDefaultEngine for speed"

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

Change 273460 merged by jenkins-bot:
Revert "mediawiki.conf: Set $wgScribuntoDefaultEngine for speed"

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

Mentioned in SAL [2016-02-26T15:14:19Z] <jzerebecki> salt -v --show-timeout '*slave*' cmd.run "bash -c 'cd /srv/deployment/integration/slave-scripts; git pull'" T128191

That change is good, but we need to improve the tests so they don't depend on configuration like this.

+1.

Why are you calling Scribunto::newDefaultEngine() in Scribunto_LuaWikibaseLibraryTest.php and Scribunto_LuaWikibaseEntityLibraryTest.php instead of using $this->getEngine()? That's bypassing all the work that Scribunto_LuaEngineTestBase does to have your code tested with both engines.

Mentioned in SAL [2016-02-27T00:51:41Z] <jzerebecki> salt -v --show-timeout '*slave*' cmd.run "bash -c 'cd /srv/deployment/integration/slave-scripts; git pull'" T128191