Problem/Motivation

Seen this a few times recently, there's no recent changes to the test so it might be a timing issue or an underlying change or something:

1) Drupal\Tests\block\Functional\BlockCacheTest::testCachePermissions
Behat\Mink\Exception\ResponseTextException: The text "ztmxv7uw" was not
found anywhere in the text of the current page.
/builds/project/drupal/vendor/behat/mink/src/WebAssert.php:907
/builds/project/drupal/vendor/behat/mink/src/WebAssert.php:293
/builds/project/drupal/core/tests/Drupal/Tests/WebAssert.php:975
/builds/project/drupal/core/modules/block/tests/src/Functional/BlockCacheTest.php:159

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3468830

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.

spokje’s picture

So we have 5 test-failures in a 2500x run. https://git.drupalcode.org/issue/drupal-3468830/-/jobs/3015899

So it _could_ be happening more often due to timing issues when running along other tests, running this test alone (although *often*) would trigger it.

spokje’s picture

Assigned: Unassigned » spokje
spokje’s picture

Title: [random test failure] BlockCacheTest » [random test failure] BlockCacheTest::testCachePermissions()

catch’s picture

dww’s picture

See also https://git.drupalcode.org/issue/drupal-2630732/-/jobs/3310474 for related fails in BlockCacheTest::testCachePerPage()

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

spokje changed the visibility of the branch 11.x to hidden.

spokje’s picture

MR !10698 (which is basically \Drupal\Tests\block\Functional\BlockCacheTest trimmed down to only contain testCachePermissions() and some pipeline changes to make it, and only it, run 2500 times) gives us 8 fails out of the 2500 runs.
MR !10699 shows that changing \Drupal::state()->set()/get() to Drupal::keyValue()->set()/get(); as suggested in the Slack thread passes a 2500 times run without errors.

Which shows to me that when #3477586: [random test failure] LayoutBuilderBlocksTest::testBlockPlaceholder failing lands, this issue should be solved.

Re #7, #3477586: [random test failure] LayoutBuilderBlocksTest::testBlockPlaceholder failing also makes changes for that method, so the random failures there also should be gone.

spokje’s picture

spokje’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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