[random test failure] CronRunTest::testAutomatedCron

Created on 10 August 2023, over 1 year ago
Updated 17 August 2023, over 1 year ago

Problem/Motivation

Drupal\Tests\system\Functional\System\CronRunTest

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

Testing Drupal\Tests\system\Functional\System\CronRunTest
.F...                                                               5 / 5 (100%)

Time: 00:24.576, Memory: 4.00 MB

There was 1 failure:

1) Drupal\Tests\system\Functional\System\CronRunTest::testAutomatedCron
Failed asserting that 1691657672 is less than 1691657672.

/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/system/tests/src/Functional/System/CronRunTest.php:82
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>

I've seen it a few more times in the week or so than the two listed below
https://www.drupal.org/pift-ci-job/2737315 β†’
https://www.drupal.org/pift-ci-job/2734245 β†’

Proposed resolution

I _think_ in #4 πŸ› [random test failure] CronRunTest::testAutomatedCron Fixed I proved there's a race condition between the admin_user login triggering cron and updating its state, and this test doing the same thing.

I'm _sure_ using the \Drupal\Tests\WaitTerminateTestTrait solves whatever was wrong, see #5 πŸ› [random test failure] CronRunTest::testAutomatedCron Fixed .

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Fixed

Version

11.0 πŸ”₯

Component
CronΒ  β†’

Last updated 19 days ago

No maintainer
Created by

πŸ‡³πŸ‡ΏNew Zealand quietone

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024