Problem/Motivation

The people at the county fair,
Were shocked asethey heard a loud blare:

A bear, a bear!
it's right over there, it's right over there!
I swear, I swear!
It shouldn't be there, It _shouldn't_ be there!

And one said with some flair:
And why exactly, should we care?

Because it causes a random ExpectationFailedException, you fake Dr. Suess!

1) Drupal\Tests\media_library\FunctionalJavascript\EntityReferenceWidgetTest::testWidget
"Bear" was found but shouldn't be there.
Failed asserting that a boolean is not empty.

/var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122
/var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:55
/var/www/html/core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php:86
/var/www/html/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php:212
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
And add to that,
the appearance of a cat!
Which is bad,
because the place it's at,
has no need for a cat.
O no, we don't want that!

Oh, shut up!

It seems that a similar random failure occurs (less frequently than the above one) later on in the test:

1) Drupal\Tests\media_library\FunctionalJavascript\EntityReferenceWidgetTest::testWidget
Behat\Mink\Exception\ResponseTextException: The text "Cat" appears in the text of this page, but it should not.

/var/www/html/vendor/behat/mink/src/WebAssert.php:811
/var/www/html/vendor/behat/mink/src/WebAssert.php:279
/var/www/html/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php:417
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3191559

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

jhodgdon created an issue. See original summary.

catch’s picture

Title: Random test fail in EntityReferenceWidgetTest » [random test failure] Random test fail in EntityReferenceWidgetTest
spokje’s picture

Got a different incarnation in https://www.drupal.org/pift-ci-job/2038024

1	Media_library.Media_library
	1	Media_library.Drupal\Tests\media_library\FunctionalJavascript\EntityReferenceWidgetTest
	✗	
Drupal\Tests\media_library\FunctionalJavascript\EntityReferenceWidgetTest

fail: [Other] Line 0 of sites/default/files/simpletest/phpunit-104.xml:
PHPUnit Test failed to complete; Error: PHPUnit 8.5.15 by Sebastian Bergmann and contributors.

Testing Drupal\Tests\media_library\FunctionalJavascript\EntityReferenceWidgetTest
.F                                                                  2 / 2 (100%)

Time: 1.13 minutes, Memory: 4.00 MB

There was 1 failure:

1) Drupal\Tests\media_library\FunctionalJavascript\EntityReferenceWidgetTest::testWidget
"Bear" was found but shouldn't be there.
Failed asserting that a boolean is not empty.

/var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:119
/var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/LogicalNot.php:115
/var/www/html/vendor/phpunit/phpunit/src/Framework/Assert.php:2924
/var/www/html/vendor/phpunit/phpunit/src/Framework/Assert.php:890
/var/www/html/core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php:86
/var/www/html/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php:212
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:703

FAILURES!
Tests: 2, Assertions: 78, Failures: 1.

HTML output was generated
http://php-apache-jenkins-drupal-patches-81828/subdirectory/sites/simpletest/browser_output/Drupal_Tests_media_library_FunctionalJavascript_EntityReferenceWidgetTest-1-83658081.html
http://php-apache-jenkins-drupal-patches-81828/subdirectory/sites/simpletest/browser_output/Drupal_Tests_media_library_FunctionalJavascript_EntityReferenceWidgetTest-2-83658081.html
http://php-apache-jenkins-drupal-patches-81828/subdirectory/sites/simpletest/browser_output/Drupal_Tests_media_library_FunctionalJavascript_EntityReferenceWidgetTest-3-83658081.html
http://php-apache-jenkins-drupal-patches-81828/subdirectory/sites/simpletest/browser_output/Drupal_Tests_media_library_FunctionalJavascript_EntityReferenceWidgetTest-4-56300696.html
http://php-apache-jenkins-drupal-patches-81828/subdirectory/sites/simpletest/browser_output/Drupal_Tests_media_library_FunctionalJavascript_EntityReferenceWidgetTest-5-56300696.html
http://php-apache-jenkins-drupal-patches-81828/subdirectory/sites/simpletest/browser_output/Drupal_Tests_media_library_FunctionalJavascript_EntityReferenceWidgetTest-6-56300696.html
http://php-apache-jenkins-drupal-patches-81828/subdirectory/sites/simpletest/browser_output/Drupal_Tests_media_library_FunctionalJavascript_EntityReferenceWidgetTest-7-56300696.html
http://php-apache-jenkins-drupal-patches-81828/subdirectory/sites/simpletest/browser_output/Drupal_Tests_media_library_FunctionalJavascript_EntityReferenceWidgetTest-8-56300696.html
http://php-apache-jenkins-drupal-patches-81828/subdirectory/sites/simpletest/browser_output/Drupal_Tests_media_library_FunctionalJavascript_EntityReferenceWidgetTest-9-56300696.html
spokje’s picture

Another one bites the dust rears its ugly head here.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

andypost’s picture

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

spokje’s picture

Assigned: Unassigned » spokje
Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Assigned: spokje » Unassigned

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

longwave’s picture

Status: Active » Needs review

Hopefully this one has gone away either with the move to GitLab or some other fix we have made in the past two years.

https://git.drupalcode.org/project/drupal/-/jobs/2161099 ran 100x with no fails.

https://git.drupalcode.org/project/drupal/-/jobs/2161218 running 500x, if that doesn't fail either then I suggest we revert the skip.

longwave’s picture

500x job failed due to a GitLab runner system failure, trying again at https://git.drupalcode.org/project/drupal/-/jobs/2161641

longwave’s picture

Doesn't seem to be able to run more than 150 or so without crashing the entire runner, but we do now have 500 runs or so with no actual failures.

smustgrave’s picture

Can the gitlab change be removed and don't mind marking

longwave’s picture

Done.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

And done!

  • catch committed 02507ab7 on 10.3.x
    Issue #3191559 by longwave, Spokje, smustgrave, jhodgdon: [random test...

  • catch committed 25492d3f on 10.4.x
    Issue #3191559 by longwave, Spokje, smustgrave, jhodgdon: [random test...

  • catch committed 416d0aed on 11.0.x
    Issue #3191559 by longwave, Spokje, smustgrave, jhodgdon: [random test...

  • catch committed 1c0857c9 on 11.x
    Issue #3191559 by longwave, Spokje, smustgrave, jhodgdon: [random test...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Just want to stop briefly to appreciate one of the best issue summaries in recent memory.

Committed/pushed to 11.x and cherry-picked back through to 10.3.x, thanks!

Status: Fixed » Closed (fixed)

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