Page MenuHomePhabricator

DataValues test failures
Closed, DeclinedPublic

Description

Warning: Missing argument 1 for DataValues\BooleanValue::__construct() in /www/dev.translatewiki.net/w/extensions/DataValues/DataValues/includes/values/BooleanValue.php on line 50
Notice: Undefined variable: value in /www/dev.translatewiki.net/w/extensions/DataValues/DataValues/includes/values/BooleanValue.php on line 51

Warning: Missing argument 2 for DataValues\GeoCoordinateValue::__construct() in /www/dev.translatewiki.net/w/extensions/DataValues/DataValues/includes/values/GeoCoordinateValue.php on line 82
Notice: Undefined variable: latitude in /www/dev.translatewiki.net/w/extensions/DataValues/DataValues/includes/values/GeoCoordinateValue.php on line 83
Notice: Undefined variable: longitude in /www/dev.translatewiki.net/w/extensions/DataValues/DataValues/includes/values/GeoCoordinateValue.php on line 87
Notice: Undefined variable: latitude in /www/dev.translatewiki.net/w/extensions/DataValues/DataValues/includes/values/GeoCoordinateValue.php on line 95

Warning: Missing argument 1 for DataValues\IriValue::construct() in /www/dev.translatewiki.net/w/extensions/DataValues/DataValues/includes/values/IriValue.php on line 94
Warning: Missing argument 2 for DataValues\IriValue::
construct() in /www/dev.translatewiki.net/w/extensions/DataValues/DataValues/includes/values/IriValue.php on line 94
Notice: Undefined variable: scheme in /www/dev.translatewiki.net/w/extensions/DataValues/DataValues/includes/values/IriValue.php on line 101
Notice: Undefined variable: hierarchicalPart in /www/dev.translatewiki.net/w/extensions/DataValues/DataValues/includes/values/IriValue.php on line 105
Notice: Undefined variable: scheme in /www/dev.translatewiki.net/w/extensions/DataValues/DataValues/includes/values/IriValue.php on line 109
Notice: Undefined variable: hierarchicalPart in /www/dev.translatewiki.net/w/extensions/DataValues/DataValues/includes/values/IriValue.php on line 110

Catchable fatal error: Argument 1 passed to DataValues\MediaWikiTitleValue::__construct() must be an instance of Title, none given in /www/dev.translatewiki.net/w/extensions/DataValues/DataValues/includes/values/MediaWikiTitleValue.php on line 50


Version: master
Severity: normal

Details

Reference
bz43899

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:38 AM
bzimport added a project: DataValues.
bzimport set Reference to bz43899.
bzimport added a subscriber: Unknown Object (MLST).

Steps to reproduce? I am not getting any errors when running the tests, and your report does not include the info of where the incorrect calls are happening.

Just running make safe for code unit tests. This is all the info unit tests give.

Can't reproduce. Niklas, it would be very useful if you could provide stack traces for these issues.

It would be very helpful if PHP would provide stack traces for these issues.

Give me some time to provide more information. You do realize that the other option is to drop DataValues and everything that depends on it from translatewiki.net. I doubt that is the kind of publicity you want.

This is occurring on translatewiki? I was assuming on your local dev box since no other info is specified.

It would be very helpful if PHP would provide stack traces for these issues.

Do you have xdebug installed and enabled?

Also, are you running the latest version of DataValues and the extensions using it?

No I don't have xdebug on production (the dev runs on the same server on the same environment).

This seems to be the instance of the same issue we had earlier: some other test messages up with PHP's error handling making these tests fail.

Can you link to the mentioned issue?

You should remember the array key exists issue bug earlier.

I've found at least two tests which cause this issue by selectively running tests:

(2175) WikitextContentTest::testGetSecondaryDataUpdates: E
(2176) WikitextContentTest::testGetSecondaryDataUpdates: E.....
(4900) DataValues\Test\IriValueTest::testMediaWikiTestCaseParentSetupCalled: .
(4901) DataValues\Test\MediaWikiTitleValueTest::testGetValue: .
(4902) DataValues\Test\MediaWikiTitleValueTest::testGetValue: .
(4903) DataValues\Test\MediaWikiTitleValueTest::testConstructor:
Catchable fatal error: Argument 1 passed to DataValues\MediaWikiTitleValue::__construct() must be an instance of Title, none given in /www/dev.translatewiki.net/w/extensions/DataValues/DataValues/includes/values/MediaWikiTitleValue.php on line 50

Hilarious, if I run those two tests alone I get:

  1. WikitextContentTest::testGetSecondaryDataUpdates with data set #0 ('WikitextContentTest_testGetSecondaryDataUpdates_1', 'wikitext', 'hello \'\'world\'\'

', array(array(true, array())))
MWException: LinkCache doesn't currently know about this title: WikitextContentTest_testGetSecondaryDataUpdates_1

/www/dev.translatewiki.net/w/includes/Title.php:2994
/www/dev.translatewiki.net/w/extensions/SemanticMediaWiki/includes/SMW_ParseData.php:245
/www/dev.translatewiki.net/w/extensions/SemanticMediaWiki/includes/SMW_ParseData.php:518
/www/dev.translatewiki.net/w/includes/Hooks.php:255
/www/dev.translatewiki.net/w/includes/GlobalFunctions.php:3875
/www/dev.translatewiki.net/w/includes/LinksUpdate.php:108
/www/dev.translatewiki.net/w/includes/parser/ParserOutput.php:458
/www/dev.translatewiki.net/w/includes/content/AbstractContent.php:243
/www/dev.translatewiki.net/w/tests/phpunit/includes/content/WikitextContentTest.php:77
/www/dev.translatewiki.net/w/tests/phpunit/MediaWikiTestCase.php:131
/www/dev.translatewiki.net/w/tests/phpunit/MediaWikiPHPUnitCommand.php:61
/www/dev.translatewiki.net/w/tests/phpunit/MediaWikiPHPUnitCommand.php:47

  1. WikitextContentTest::testGetSecondaryDataUpdates with data set #1 ('WikitextContentTest_testGetSecondaryDataUpdates_2', 'wikitext', 'hello [[world test 21344]]

', array(array(true, array(array(0)))))
MWException: LinkCache doesn't currently know about this title: WikitextContentTest_testGetSecondaryDataUpdates_2

/www/dev.translatewiki.net/w/includes/Title.php:2994
/www/dev.translatewiki.net/w/extensions/SemanticMediaWiki/includes/SMW_ParseData.php:245
/www/dev.translatewiki.net/w/extensions/SemanticMediaWiki/includes/SMW_ParseData.php:518
/www/dev.translatewiki.net/w/includes/Hooks.php:255
/www/dev.translatewiki.net/w/includes/GlobalFunctions.php:3875
/www/dev.translatewiki.net/w/includes/LinksUpdate.php:108
/www/dev.translatewiki.net/w/includes/parser/ParserOutput.php:458
/www/dev.translatewiki.net/w/includes/content/AbstractContent.php:243
/www/dev.translatewiki.net/w/tests/phpunit/includes/content/WikitextContentTest.php:77
/www/dev.translatewiki.net/w/tests/phpunit/MediaWikiTestCase.php:131
/www/dev.translatewiki.net/w/tests/phpunit/MediaWikiPHPUnitCommand.php:61
/www/dev.translatewiki.net/w/tests/phpunit/MediaWikiPHPUnitCommand.php:47

I don't quite understand why this causes the rest of the tests to fail. If I comment out the exception the tests run fine again.

That's an exception in core - not DataValues

Okay, we got some other tests fixed, but these are still failing for me, needs some more debugging.

What's the status here? Is this going anywhere or should we close it?

Hard to say. I'm not being able to run the tests very far at the moment because of bug 52229.

Ok thanks. Then let's close this. It doesn't seem actionable for anyone at this point so no use in keeping it open to clutter up the bugtracker.