Problem/Motivation

https://git.drupalcode.org/project/drupal/-/jobs/164471

Drupal\Tests\ckeditor5\FunctionalJavascript\MediaLinkabilityTest::testLinkability with data set "restricted" (false)
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'true'
+'false'

/builds/project/drupal/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122
/builds/project/drupal/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php:79
/builds/project/drupal/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLinkabilityTest.php:195
/builds/project/drupal/vendor/phpunit/phpunit/src/Framework/TestResult.php:728

This only fails on gitlab CI (see issue comments), so repurposing this issue to enable running the same test multiple times on gitlabci, in a similar way to how we do it on DrupalCI.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#3 500x_MediaLinkabilityTest.patch2.01 KBspokje

Issue fork drupal-3393475

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

catch created an issue. See original summary.

wim leers’s picture

Issue tags: +JavaScript

Sounds like a race condition that can be fixed using a targeted "wait".

spokje’s picture

Issue tags: -JavaScript +JavaScript
StatusFileSize
new2.01 KB
spokje’s picture

Doesn't seem to fail (frequently) on Drupal CI, no idea and/or documentation how to run a 500x-MR on GitLab, so not much in it for me here.

fjgarlin made their first commit to this issue’s fork.

catch’s picture

Title: [random test failure] MediaLinkabilityTest » Enable running the same test multiple times on gitlab ci for random test failures
Category: Bug report » Task
Issue summary: View changes
Priority: Critical » Major

Re-titling for the changed scope.

catch’s picture

Component: ckeditor5.module » phpunit
Status: Active » Needs review
catch’s picture

Status: Needs review » Reviewed & tested by the community

I have one small question on the help text, but could go either way on that.

This is considerably more ergonomic than 'find a patch that runs the same test 1,000 times from another issue, edit the classname to the one you want, then upload it to Drupal CI', or 'remember how to modify drupalci.yml so it will run the same test 1,000 times', and given we can't add custom help text to the actual gitlab UI is pretty self-documenting with the error message.

The parallel runs are less useful when you have to manually add the variables, but it will allow 'proof of non-failure' to be done more efficiently - i.e. when we want to run the test thousands of times instead of a couple hundred. And we can tweak this as we go along to support more things.

catch’s picture

catch’s picture

Made one commit here - to remove parallel because the gitlab UI was showing the entire pipeline as still in progress, and I think this might be due to parallel manual jobs. Leaving RTBC because it's just removing an added line and very trivial.

One more idea here, although it could happen in a follow-up, would be to add an extra variable for REPEAT, then in the pipeline default that to 100 but use it to override the number of runs, so someone can put 1000 for a unit test if they want/need to.

  • catch committed 1748f212 on 10.2.x
    Issue #3393475 by fjgarlin, catch: Enable running the same test multiple...

  • catch committed b06be9b6 on 11.x
    Issue #3393475 by fjgarlin, catch: Enable running the same test multiple...
catch’s picture

Version: 11.x-dev » 10.2.x-dev
Status: Reviewed & tested by the community » Fixed

Going to go ahead and commit this to unblock more random rest failure sleuthing. Committed/pushed to 11.x and cherry-picked to 10.2.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.