Skip to content

Commit 4a8c806

Browse files
Copilotswissspidy
andcommitted
Fix cron.feature:309 test by disabling spawn_cron() interference
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
1 parent d558eda commit 4a8c806

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

features/cron.feature

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,13 @@ Feature: Manage WP-Cron events and schedules
307307
# executes the "wp_privacy_delete_old_export_files" event there.
308308
@require-wp-5.0
309309
Scenario: Run currently scheduled events
310+
# Disable web-triggered cron so spawn_cron() cannot set doing_cron between
311+
# steps - wp cron event run always defines DOING_CRON so this has no effect
312+
# on the commands being tested.
313+
When I run `wp config set DISABLE_WP_CRON true --raw`
314+
310315
# WP throws a notice here for older versions of core.
311-
When I try `wp cron event run --all`
316+
And I try `wp cron event run --all`
312317
Then STDOUT should contain:
313318
"""
314319
Executed the cron event 'wp_version_check'

0 commit comments

Comments
 (0)