Page MenuHomePhabricator

Random test failure Flow\Tests\Api\ApiFlowModerateTopicTest::testModerateLockedTopic and Flow\Tests\Collection\PostCollectionTest::testGetLastRevision
Closed, DuplicatePublic

Description

Another flaky Flow test failure.

23:02:04 Time: 3.94 minutes, Memory: 646.81MB
23:02:04 
23:02:04 There was 1 error:
23:02:04 
23:02:04 1) Flow\Tests\Api\ApiFlowModerateTopicTest::testModerateLockedTopic
23:02:04 Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? 
23:02:04 Query: INSERT  INTO `unittest_flow_revision` (rev_id,rev_user_id,rev_user_ip,rev_user_wiki,rev_parent_id,rev_change_type,rev_type,rev_type_id,rev_content,rev_flags,rev_mod_state,rev_mod_user_id,rev_mod_user_ip,rev_mod_user_wiki,rev_mod_timestamp,rev_mod_reason,rev_last_edit_id,rev_edit_user_id,rev_edit_user_ip,rev_edit_user_wiki,rev_content_length,rev_previous_content_length) VALUES ('�z#p�4:��','1',NULL,'wikidb-unittest_','�z#p��4:��','delete-topic','post','�z#p��4:��','Hi there!','utf-8,topic-title-wikitext','delete','1',NULL,'wikidb-unittest_','20181116215905','<>&{};',NULL,NULL,NULL,NULL,'0','9')
23:02:04 Function: Flow\Data\Storage\RevisionStorage::insert
23:02:04 Error: 1062 Duplicate entry '\x05\x9Cz#p\xA3\xFE4:\x9C\xED' for key 'flow_revision_unique_parent' (/workspace/db/quibble-mysql-a08yeqot/socket)
23:02:04 
23:02:04 
23:02:04 /workspace/src/includes/libs/rdbms/database/Database.php:1506
23:02:04 /workspace/src/includes/libs/rdbms/database/Database.php:1476
23:02:04 /workspace/src/includes/libs/rdbms/database/Database.php:1236
23:02:04 /workspace/src/includes/libs/rdbms/database/Database.php:2068
23:02:04 /workspace/src/extensions/Flow/includes/Data/Storage/RevisionStorage.php:392
23:02:04 /workspace/src/extensions/Flow/includes/Data/ObjectManager.php:248
23:02:04 /workspace/src/extensions/Flow/includes/Data/ObjectManager.php:173
23:02:04 /workspace/src/extensions/Flow/includes/Data/ObjectManager.php:146
23:02:04 /workspace/src/extensions/Flow/includes/Data/ManagerGroup.php:81
23:02:04 /workspace/src/extensions/Flow/includes/Block/Topic.php:444
23:02:04 /workspace/src/extensions/Flow/includes/SubmissionHandler.php:160
23:02:04 /workspace/src/extensions/Flow/includes/WorkflowLoader.php:66
23:02:04 /workspace/src/extensions/Flow/includes/Api/ApiFlowBasePost.php:35
23:02:04 /workspace/src/extensions/Flow/includes/Api/ApiFlow.php:98
23:02:04 /workspace/src/includes/api/ApiMain.php:1570
23:02:04 /workspace/src/includes/api/ApiMain.php:500
23:02:04 /workspace/src/tests/phpunit/includes/api/ApiTestCase.php:107
23:02:04 /workspace/src/extensions/Flow/tests/phpunit/Api/ApiTestCase.php:73
23:02:04 /workspace/src/extensions/Flow/tests/phpunit/Api/ApiFlowModerateTopicTest.php:114
23:02:04 /workspace/src/tests/phpunit/MediaWikiTestCase.php:424
23:02:04 /workspace/src/maintenance/doMaintenance.php:94
23:02:04 
23:02:04 --
23:02:04 
23:02:04 There was 1 failure:
23:02:04 
23:02:04 1) Flow\Tests\Collection\PostCollectionTest::testGetLastRevision
23:02:04 Failed asserting that false is true.
23:02:04 
23:02:04 /workspace/src/extensions/Flow/tests/phpunit/Collection/PostCollectionTest.php:90
23:02:04 /workspace/src/tests/phpunit/MediaWikiTestCase.php:424
23:02:04 /workspace/src/maintenance/doMaintenance.php:94
23:02:04 
23:02:04 FAILURES!
23:02:04 Tests: 3809, Assertions: 12756, Errors: 1, Failures: 1, Skipped: 102.

See here: https://integration.wikimedia.org/ci/job/wmf-quibble-vendor-mysql-hhvm-docker/10435/console. Related patch: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/474300.

Event Timeline

D3r1ck01 triaged this task as Normal priority.Nov 16 2018, 10:07 PM
D3r1ck01 created this task.
Restricted Application removed a project: Patch-For-Review. · View Herald TranscriptNov 16 2018, 10:07 PM

I need to check in with @hashar next week but looking at all of these together, but I suspect it's an issue where the MySQL instance in the Docker container is behaving erratically, rather than any issues in Flow's test code. Why it's happening for Flow and not other extensions is unclear to me but I also don't know what configuration is in place for Flow in these tests.