Page MenuHomePhabricator

LexemeMergerTest: avoid conflicting lemmas in default test data
Closed, ResolvedPublic

Description

Sporadically (very rarely) the following happens

17:04:12 1) Wikibase\Lexeme\Tests\Merge\LexemeMergerTest::testGivenLexemesWithMultipleMatchingFormsFirstMatchMergedRestCopiedUnchanged
17:04:12 Wikibase\Lexeme\Merge\Exceptions\ConflictingLemmaValueException: 
17:04:12 
17:04:12 /workspace/src/extensions/WikibaseLexeme/src/Merge/LexemeMerger.php:73
17:04:12 /workspace/src/extensions/WikibaseLexeme/src/Merge/LexemeMerger.php:51
17:04:12 /workspace/src/extensions/WikibaseLexeme/tests/phpunit/composer/Merge/LexemeMergerTest.php:337
17:04:12 /workspace/src/maintenance/doMaintenance.php:94

e.g. https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php70-docker/8589/console

Maybe the random lemmas generated are too likely to be identical?

Also happened to 2 devs locally.

Details

Related Gerrit Patches:
mediawiki/extensions/WikibaseLexeme : masterLexemeMergerTest: avoid conflicting lemmas

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 30 2018, 10:13 AM
Pablo-WMDE updated the task description. (Show Details)Aug 30 2018, 10:18 AM
Pablo-WMDE updated the task description. (Show Details)Aug 30 2018, 10:32 AM
Pablo-WMDE added a comment.EditedAug 30 2018, 10:36 AM

Added code dumping the source and target lemmas and ran it repeatedly

pagr@C217:~/projects/addshore-mediawiki-docker-dev$ docker-compose -f docker-compose.yml -f docker-compose.lexeme.yml -f docker-compose.browsertest.yml exec web //var/www/mediawiki/tests/phpunit/phpunit.php --wiki default --filter 'LexemeMergerTest::testGivenLexemesWithMultipleMatchingFormsFirstMatchMergedRestCopiedUnchanged' --repeat 100 --stop-on-failure //var/www/mediawiki/extensions/WikibaseLexeme/tests/phpunit/
Using PHP 7.2.8
PHPUnit 6.5.12 by Sebastian Bergmann and contributors.

.................................................F/var/www/mediawiki/extensions/WikibaseLexeme/tests/phpunit/composer/Merge/LexemeMergerTest.php:340:
array(1) {
  'gu' =>
  string(5) "dbqsx"
}
/var/www/mediawiki/extensions/WikibaseLexeme/tests/phpunit/composer/Merge/LexemeMergerTest.php:340:
array(1) {
  'gu' =>
  string(8) "egdtxvfu"
}


Time: 28.15 seconds, Memory: 46.00MB

There was 1 failure:

1) Wikibase\Lexeme\Tests\Merge\LexemeMergerTest::testGivenLexemesWithMultipleMatchingFormsFirstMatchMergedRestCopiedUnchanged

/var/www/mediawiki/extensions/WikibaseLexeme/tests/phpunit/composer/Merge/LexemeMergerTest.php:341
/var/www/mediawiki/maintenance/doMaintenance.php:94

Another data set:
'zk' => 'wzydq' vs 'zk' => 'rmdtajzbn'

Change 456370 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/WikibaseLexeme@master] LexemeMergerTest: avoid conflicting lemmas

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

Pablo-WMDE renamed this task from NewLexeme: random lemmas conflicting to LexemeMergerTest: avoid conflicting lemmas in default test data.Aug 30 2018, 11:10 AM

Change 456370 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] LexemeMergerTest: avoid conflicting lemmas

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

Pablo-WMDE closed this task as Resolved.Aug 30 2018, 12:53 PM
Pablo-WMDE removed Jakob_WMDE as the assignee of this task.
Pablo-WMDE added a subscriber: Jakob_WMDE.