Problem/Motivation

Drupal\Tests\layout_builder\Functional\LayoutSectionTest::testLayoutSectionFormatterAccess
Behat\Mink\Exception\ResponseTextException: The text "Hello test world" was not found anywhere in the text of the current page.

vendor/behat/mink/src/WebAssert.php:907
vendor/behat/mink/src/WebAssert.php:293
core/tests/Drupal/Tests/WebAssert.php:979
core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php:312
core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php:210

Example: https://git.drupalcode.org/issue/drupal-3496195/-/jobs/3824748

Steps to reproduce

Proposed resolution

Use keyValue instead of State.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3496259

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

spokje created an issue. See original summary.

spokje’s picture

spokje changed the visibility of the branch 3496259-random-test-failure to hidden.

spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

MR !10707 (which is Drupal\Tests\layout_builder\Functional\LayoutSectionTest::testLayoutSectionFormatterAccess and some pipeline changes to make it, and only it, run 7500 times) gives us 102 fails out of the 7500 runs.

MR !10708 shows that changing \Drupal::state()->set()/get() to Drupal::keyValue()->set()/get(); passes a 7500 times run without errors.

spokje changed the visibility of the branch 3496259-random-test-failure to active.

spokje’s picture

Assigned: spokje » Unassigned
Status: Active » Needs review

The changes that should be committed after review are in MR!10710

spokje’s picture

spokje’s picture

Title: [random test failure] LayoutSectionTest::testLayoutSectionFormatterAcces » [random test failure] LayoutSectionTest::testLayoutSectionFormatterAccess
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Same as before. With spoken excellent findings seems doing the replacement has a net gain so let’s do it!

longwave’s picture

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

Thanks for tracking this down. Backported to all active branches to keep things in sync.

Committed and pushed 2396ee2b3ab to 11.x and dd7ff90bdfa to 11.1.x and ed553d58c88 to 10.5.x and 404d8829a36 to 10.4.x. Thanks!

  • longwave committed 404d8829 on 10.4.x
    Issue #3496259 by spokje: [random test failure] LayoutSectionTest::...

  • longwave committed ed553d58 on 10.5.x
    Issue #3496259 by spokje: [random test failure] LayoutSectionTest::...

  • longwave committed dd7ff90b on 11.1.x
    Issue #3496259 by spokje: [random test failure] LayoutSectionTest::...

  • longwave committed 2396ee2b on 11.x
    Issue #3496259 by spokje: [random test failure] LayoutSectionTest::...
longwave’s picture

Fixing credits

Status: Fixed » Closed (fixed)

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