Page MenuHomePhabricator

Wikibase\Lexeme\Tests\MediaWiki\Search\LexemeCompletionSearchTest fails on PHP 7.1
Closed, ResolvedPublic3 Estimated Story Points

Description

122:37:25 There were 6 failures:
222:37:25
322:37:25 1) Wikibase\Lexeme\Tests\MediaWiki\Search\LexemeCompletionSearchTest::testSearchElastic with data set "simple" ('Duck', 'simple')
422:37:25 Failed asserting that two strings are equal.
522:37:25 --- Expected
622:37:25 +++ Actual
722:37:25 @@ @@
822:37:25 - "weight": 0.4\n
922:37:25 + "weight": 0.40000000000000002\n
1022:37:25 @@ @@
1122:37:25 - "weight": 0.6\n
1222:37:25 + "weight": 0.59999999999999998\n
1322:37:25
1422:37:25 /workspace/src/tests/phpunit/MediaWikiTestCase.php:2265
1522:37:25 /workspace/src/extensions/WikibaseLexeme/tests/phpunit/mediawiki/Search/LexemeCompletionSearchTest.php:86
1622:37:25 /workspace/src/tests/phpunit/MediaWikiTestCase.php:409
1722:37:25 /workspace/src/maintenance/doMaintenance.php:94
1822:37:25
1922:37:25 2) Wikibase\Lexeme\Tests\MediaWiki\Search\LexemeCompletionSearchTest::testSearchElastic with data set "byid" ('(L2)', 'byid')
2022:37:25 Failed asserting that two strings are equal.
2122:37:25 --- Expected
2222:37:25 +++ Actual
2322:37:25 @@ @@
2422:37:25 - "weight": 0.4\n
2522:37:25 + "weight": 0.40000000000000002\n
2622:37:25 @@ @@
2722:37:25 - "weight": 0.6\n
2822:37:25 + "weight": 0.59999999999999998\n
2922:37:25
3022:37:25 /workspace/src/tests/phpunit/MediaWikiTestCase.php:2265
3122:37:25 /workspace/src/extensions/WikibaseLexeme/tests/phpunit/mediawiki/Search/LexemeCompletionSearchTest.php:86
3222:37:25 /workspace/src/tests/phpunit/MediaWikiTestCase.php:409
3322:37:25 /workspace/src/maintenance/doMaintenance.php:94
3422:37:25
3522:37:25 3) Wikibase\Lexeme\Tests\MediaWiki\Search\LexemeCompletionSearchTest::testSearchFormElastic with data set "simple" ('Duck', 'simple')
3622:37:25 Failed asserting that two strings are equal.
3722:37:25 --- Expected
3822:37:25 +++ Actual
3922:37:25 @@ @@
4022:37:25 - "weight": 0.4\n
4122:37:25 + "weight": 0.40000000000000002\n
4222:37:25 @@ @@
4322:37:25 - "weight": 0.6\n
4422:37:25 + "weight": 0.59999999999999998\n
4522:37:25
4622:37:25 /workspace/src/tests/phpunit/MediaWikiTestCase.php:2265
4722:37:25 /workspace/src/extensions/WikibaseLexeme/tests/phpunit/mediawiki/Search/LexemeCompletionSearchTest.php:105
4822:37:25 /workspace/src/tests/phpunit/MediaWikiTestCase.php:409
4922:37:25 /workspace/src/maintenance/doMaintenance.php:94
5022:37:25
5122:37:25 4) Wikibase\Lexeme\Tests\MediaWiki\Search\LexemeCompletionSearchTest::testSearchFormElastic with data set "byid" ('(L2)', 'byid')
5222:37:25 Failed asserting that two strings are equal.
5322:37:25 --- Expected
5422:37:25 +++ Actual
5522:37:25 @@ @@
5622:37:25 - "weight": 0.4\n
5722:37:25 + "weight": 0.40000000000000002\n
5822:37:25 @@ @@
5922:37:25 - "weight": 0.6\n
6022:37:25 + "weight": 0.59999999999999998\n
6122:37:25
6222:37:25 /workspace/src/tests/phpunit/MediaWikiTestCase.php:2265
6322:37:25 /workspace/src/extensions/WikibaseLexeme/tests/phpunit/mediawiki/Search/LexemeCompletionSearchTest.php:105
6422:37:25 /workspace/src/tests/phpunit/MediaWikiTestCase.php:409
6522:37:25 /workspace/src/maintenance/doMaintenance.php:94
6622:37:25
6722:37:25 5) Wikibase\Lexeme\Tests\MediaWiki\Search\LexemeFullTextQueryBuilderTest::testSearchElastic with data set "work" ('duck', '/workspace/src/extensions/Wik...pected')
6822:37:25 Failed asserting that two strings are equal.
6922:37:25 --- Expected
7022:37:25 +++ Actual
7122:37:25 @@ @@
7222:37:25 - "boost": 0.1\n
7322:37:25 + "boost": 0.10000000000000001\n
7422:37:25 @@ @@
7522:37:25 - "boost": 0.1\n
7622:37:25 + "boost": 0.10000000000000001\n
7722:37:25 @@ @@
7822:37:25 - "weight": 0.4\n
7922:37:25 + "weight": 0.40000000000000002\n
8022:37:25 @@ @@
8122:37:25 - "weight": 0.6\n
8222:37:25 + "weight": 0.59999999999999998\n
8322:37:25
8422:37:25 /workspace/src/tests/phpunit/MediaWikiTestCase.php:2265
8522:37:25 /workspace/src/extensions/WikibaseLexeme/tests/phpunit/mediawiki/Search/LexemeFullTextQueryBuilderTest.php:97
8622:37:25 /workspace/src/tests/phpunit/MediaWikiTestCase.php:409
8722:37:25 /workspace/src/maintenance/doMaintenance.php:94
8822:37:25
8922:37:25 6) Wikibase\Lexeme\Tests\MediaWiki\Search\LexemeFullTextQueryBuilderTest::testSearchElastic with data set "id" (' L2-F1 ', '/workspace/src/extensions/Wik...pected')
9022:37:25 Failed asserting that two strings are equal.
9122:37:25 --- Expected
9222:37:25 +++ Actual
9322:37:25 @@ @@
9422:37:25 - "boost": 0.1\n
9522:37:25 + "boost": 0.10000000000000001\n
9622:37:25 @@ @@
9722:37:25 - "boost": 0.1\n
9822:37:25 + "boost": 0.10000000000000001\n
9922:37:25 @@ @@
10022:37:25 - "weight": 0.4\n
10122:37:25 + "weight": 0.40000000000000002\n
10222:37:25 @@ @@
10322:37:25 - "weight": 0.6\n
10422:37:25 + "weight": 0.59999999999999998\n
10522:37:25
10622:37:25 /workspace/src/tests/phpunit/MediaWikiTestCase.php:2265
10722:37:25 /workspace/src/extensions/WikibaseLexeme/tests/phpunit/mediawiki/Search/LexemeFullTextQueryBuilderTest.php:97
10822:37:25 /workspace/src/tests/phpunit/MediaWikiTestCase.php:409
10922:37:25 /workspace/src/maintenance/doMaintenance.php:94

https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php71-docker/1/console

Can be verified by commenting "check experimental" in Gerrit to trigger the PHP 7.1 jobs. T205958: Wikibase\Repo\Search\Elastic\Tests\EntitySearchElasticFulltextTest::testSearchElastic fails on PHP 7.1 appears nearly identical. Looks to be caused by https://wiki.php.net/rfc/precise_float_value.

Event Timeline

Legoktm created this task.Oct 3 2018, 5:45 AM
Restricted Application added a project: Wikidata. · View Herald TranscriptOct 3 2018, 5:45 AM
Restricted Application added a project: Discovery-Search. · View Herald TranscriptOct 8 2018, 7:39 AM
Addshore moved this task from incoming to ready to go on the Wikidata board.Oct 8 2018, 1:03 PM
Addshore set the point value for this task to 3.
Addshore triaged this task as High priority.Oct 9 2018, 1:43 PM
Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptOct 9 2018, 3:12 PM

Change 465443 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/WikibaseLexeme@master] Add JSON_NUMERIC_CHECK to json_encode

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

Change 465443 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Set serialize_precision to fix tests on PHP 7.1+

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

Legoktm closed this task as Resolved.Oct 10 2018, 5:34 PM

Follow-up work is ongoing, but this is fixed now.

Change 466982 had a related patch set uploaded (by Smalyshev; owner: Smalyshev):
[mediawiki/extensions/WikibaseLexeme@master] Use the same precision as in T205958

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

Change 466982 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Use the same precision as in T205958

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