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
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:
- 3496259-2500x-LayoutSectionTest-testLayoutSectionFormatterAcces-as-is
changes, plain diff MR !10707
- 3496259-2500x-LayoutSectionTest-testLayoutSectionFormatterAcces-key-value
changes, plain diff MR !10708
- 3496259-random-test-failure
changes, plain diff MR !10710
- 3496259-fixes
changes, plain diff MR !10709
Comments
Comment #2
spokjeComment #3
spokjeComment #7
spokjeComment #8
spokjeComment #9
spokjeMR !10707 (which is
Drupal\Tests\layout_builder\Functional\LayoutSectionTest::testLayoutSectionFormatterAccessand 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.
Comment #14
spokjeThe changes that should be committed after review are in MR!10710
Comment #15
spokjeComment #16
spokjeComment #17
smustgrave commentedSame as before. With spoken excellent findings seems doing the replacement has a net gain so let’s do it!
Comment #18
longwaveThanks 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!
Comment #23
longwaveFixing credits