Active
Project:
Metatag
Version:
2.0.x-dev
Component:
Tests
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Jul 2024 at 15:06 UTC
Updated:
23 Apr 2025 at 16:27 UTC
Jump to comment: Most recent
The MaintenanceModeTest test occasionally fails, e.g.: https://git.drupalcode.org/project/metatag/-/jobs/2265753
Drupal\Tests\metatag\Functional\MaintenanceModeTest 0 passes 1 exceptions
FATAL Drupal\Tests\metatag\Functional\MaintenanceModeTest: test runner returned a non-zero error code (2).
Drupal\Tests\metatag\Functional\MaintenanceModeTest 0 passes 1 fails
---- Drupal\Tests\metatag\Functional\MaintenanceModeTest ----
Status Group Filename Line Function
--------------------------------------------------------------------------------
Exception Other phpunit-6.xml 0 Drupal\Tests\metatag\Functional\Mai
PHPUnit Test failed to complete; Error: PHPUnit 9.6.20 by Sebastian
Bergmann and contributors.
Testing Drupal\Tests\metatag\Functional\MaintenanceModeTest
E 1 / 1
(100%)
Time: 00:07.916, Memory: 4.00 MB
There was 1 error:
1) Drupal\Tests\metatag\Functional\MaintenanceModeTest::testUser1
Behat\Mink\Exception\ExpectationException: The string "Access denied | "
appears in the HTML response of this page, but it should not.
/builds/project/metatag/vendor/behat/mink/src/WebAssert.php:888
/builds/project/metatag/vendor/behat/mink/src/WebAssert.php:380
/builds/project/metatag/web/core/tests/Drupal/Tests/WebAssert.php:566
/builds/project/metatag/tests/src/Functional/MaintenanceModeTest.php:59
/builds/project/metatag/vendor/phpunit/phpunit/src/Framework/TestResult.php:729
ERRORS!
Tests: 1, Assertions: 3, Errors: 1.
HTML output was generated
http://localhost/web/sites/simpletest/browser_output/Drupal_Tests_metatag_Functional_MaintenanceModeTest-1-83011154.html
http://localhost/web/sites/simpletest/browser_output/Drupal_Tests_metatag_Functional_MaintenanceModeTest-2-83011154.html
Fail run-tests. Unknown 0 Unknown
FATAL Drupal\Tests\metatag\Functional\MaintenanceModeTest: test runner
returned a non-zero error code (2).
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
Comment #3
damienmckennaDoing a little debugging on this, the problem is that the after maintenance mode is set and the render cache is invalidated, loading the user/1 page again results in the "Access denied" message instead of the "Site under maintenance" message.
So for some reason the output cache was not invalidated as expected.