- Issue created by @quietone
- Assigned to spokje
- π³π±Netherlands spokje
Let's first see if this is reproducible with a patch that runs
\Drupal\Tests\system\Functional\System\CronRunTest::testAutomatedCron
, and only that, 7500 times. - last update
over 1 year ago 1 pass, 1 fail - last update
over 1 year ago 1 pass, 1 fail - π³π±Netherlands spokje
I think the patch in #3 π [random test failure] CronRunTest::testAutomatedCron Fixed with output like
1) Drupal\Tests\system\Functional\System\CronRunTest::testAutomatedCron || 1:10800 || 2:10800 || 3:10800 || 4:10800 || 5:10800 || 6:10800||| | 1:10800 | 2:100 Failed asserting that 10800 is identical to 100. /var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122 /var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php:79 /var/www/html/core/modules/system/tests/src/Functional/System/CronRunTest.php:55 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
proves that, although the config
automated_cron.settings.interval
is set to 100, at the moment of checking it in\Drupal\automated_cron\EventSubscriber\AutomatedCron::onTerminate
it sometime is still the default 10800.The only reason I can think of why this would be happening is a race conditionsbetween the admin_user login triggering cron and updating its state, and this test doing the same thing.
- π³π±Netherlands spokje
Let's see if using
\Drupal\Tests\WaitTerminateTestTrait::setWaitForTerminate
can help us out here.Patch using that Trait and running
\Drupal\Tests\system\Functional\System\CronRunTest::testAutomatedCron
, and only that, 7500 times attached together with the original 7500 patch from #2 π [random test failure] CronRunTest::testAutomatedCron Fixed . - last update
over 1 year ago 1 pass, 1 fail - last update
over 1 year ago 1 pass - last update
over 1 year ago 1 pass - last update
over 1 year ago 1 pass - last update
over 1 year ago 1 pass - last update
over 1 year ago 1 pass - last update
over 1 year ago 1 pass - π³π±Netherlands spokje
6 * 7500 = 45.000 failure free runs vs 7 failures in a non-patched 7500 run is good enough for me.
The actual patch will be in the MR.
- last update
over 1 year ago Custom Commands Failed - @spokje opened merge request.
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 11:22am 13 August 2023 - last update
over 1 year ago 29,958 pass - Status changed to RTBC
over 1 year ago 7:19pm 14 August 2023 - πΊπΈUnited States smustgrave
6 * 7500 = 45.000 failure free runs vs 7 failures in a non-patched 7500 run is good enough for me.
Wooo!
- last update
over 1 year ago 29,959 pass - last update
over 1 year ago 29,971 pass - Status changed to Fixed
over 1 year ago 1:28pm 17 August 2023 -
longwave β
committed eaca861b on 11.x
Issue #3380433 by Spokje, quietone: [random test failure] CronRunTest::...
-
longwave β
committed eaca861b on 11.x
Automatically closed - issue fixed for 2 weeks with no activity.