Page MenuHomePhabricator

Flow\Tests\Model\UUIDTest::invalidInputProvider() can randomly fail
Closed, ResolvedPublic

Description

The test generates a random UUID (here) then tests that converting lowercase letters to uppercase generates an exception. It is possible for the randomly-generated UUID to not contain any letters in one of the base-36 or base-16 representations tested, in which case the test will fail. While the chances of this happening are very low, it happened in https://integration.wikimedia.org/ci/job/mediawiki-extensions-hhvm-jessie/17492/console.

14:10:17 There was 1 failure:
14:10:17 
14:10:17 1) Flow\Tests\Model\UUIDTest::testInvalidInputOnCreate with data set #2 ('0574757892939740563985')
14:10:17 Failed asserting that exception of type "\Flow\Exception\InvalidInputException" is thrown.
14:10:17 
14:10:17 /home/jenkins/workspace/mediawiki-extensions-hhvm-jessie/src/tests/phpunit/MediaWikiTestCase.php:415
14:10:17 /home/jenkins/workspace/mediawiki-extensions-hhvm-jessie/src/maintenance/doMaintenance.php:111

The test should use static UUID inputs rather than generating one randomly.

Event Timeline

Anomie created this task.Jul 7 2017, 5:24 PM
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptJul 7 2017, 5:24 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Krinkle triaged this task as Unbreak Now! priority.EditedMar 20 2018, 2:06 AM
Krinkle moved this task from Old Untriaged to Untriaged on the Collaboration-Team-Triage board.
Krinkle added a subscriber: Krinkle.

Still happening. Same trace as previously.

(Example: https://gerrit.wikimedia.org/r/#/c/420617/ / https://integration.wikimedia.org/ci/job/mediawiki-extensions-hhvm-jessie/39680/console).

There was 1 failure:

1) Flow\Tests\Model\UUIDTest::testInvalidInputOnCreate with data set #2 ('0589046041758695304819')
Failed asserting that exception of type "\Flow\Exception\InvalidInputException" is thrown.

/home/jenkins/workspace/mediawiki-extensions-hhvm-jessie/src/tests/phpunit/MediaWikiTestCase.php:420
/home/jenkins/workspace/mediawiki-extensions-hhvm-jessie/src/maintenance/doMaintenance.php:94

This task represents an issue with the reliability of Flow's unit tests. Given that Flow is currently given high-visibility treatment in our shared Jenkins pipeline with other extensions, this caused changes proposed by developers to other repositories (such as MediaWiki core and other extensions) to intermittently cause test failures.

Please disable the broken test and/or address it as soon as possible. (similar to T151878#4059968, T189329#4055461)

Restricted Application added subscribers: Liuxinyu970226, TerraCodes. · View Herald TranscriptMar 20 2018, 2:06 AM

Change 420669 had a related patch set uploaded (by Sbisson; owner: Sbisson):
[mediawiki/extensions/Flow@master] Test with hardcoded UUID to ensure they meet the tests requirements

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

Change 420669 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Test with hardcoded UUID to ensure they meet the tests requirements

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

Jdforrester-WMF lowered the priority of this task from Unbreak Now! to High.Mar 21 2018, 12:29 AM
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

Given this is now merged, I'm provisionally de-UBN-ing it.

Does this bug have any impact for users?

Does this bug have any impact for users?

It had an impact on some gerrit users who were trying to get a patch merged but no impact on wiki users.

Etonkovidova closed this task as Resolved.Mar 27 2018, 9:43 PM
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:10 PM