How to deal with a random test failure

Last updated on
16 January 2026

When a merge request has a test failure that is unrelated to the changes it may be due to a known random test failure. 

Random test failures happen most often with JavaScript tests, but not always.

Use these instructions to determine if a test failure is a know random failure.

  1. Confirm the failure is a random failure.
    1. You can see why the test failed by viewing the test results using the GitLab UI.
    2. Search for an existing issue related to the failure, or ask about it in Drupal Slack.
    3. Read the test result output carefully.
      • If the test that's failing is added in the issue, then it is not an existing random test failure. It should be fixed in the issue.
      • Pay special attention to JavaScript test failures that might be related to the changes in the issue. This could indicate the issue is introducing a new random test failure, and should not be committed until it is resolved. If you believe this to be the case, seek feedback from the Drupal core committers or Drupal Association infrastructure team on whether the test failure has happened before and on how it should be fixed.
    4. Rerun the test job. If the test fails a second time with the same exact result, it's not likely to be a random test failure.
  2. Look for an existing issue for the test failure. An existing issue can be found using the following steps.
    1. Search issues with the "Random test failure" issue tag.
    2. Check the meta issue for reports of the failure. There may be a child issue already made but the issue tag was forgotten. #2829040: [meta] Known intermittent, random, and environment-specific test failures
  3. If you find an existing issue, comment on that issue, linking to your issue.
  4. If you don't find an existing issue for that random failure.
    1. Create a child issue of #2829040: [meta] Known intermittent, random, and environment-specific test failures.
    2. Add a link to the test results that has the failure.
    3. Add the tag, "Random test failure".
    4. Add the issue to #2829040: [meta] Known intermittent, random, and environment-specific test failures.

Help improve this page

Page status: No known problems

You can: