From a6264bc1e5b0ecbedf16a3cd946acb4099f53114 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 11 May 2015 21:02:33 -0700 Subject: [PATCH] CRM_Mailing_BAO_Mailing::processQueue - Allow tests to prolong the critical section --- CRM/Mailing/BAO/Mailing.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CRM/Mailing/BAO/Mailing.php b/CRM/Mailing/BAO/Mailing.php index d37b75a188..df4329f44f 100644 --- a/CRM/Mailing/BAO/Mailing.php +++ b/CRM/Mailing/BAO/Mailing.php @@ -2928,6 +2928,11 @@ WHERE civicrm_mailing_job.id = %1 CRM_Core_Error::debug_log_message('Returning early, since max number of cronjobs running'); return TRUE; } + + if (getenv('CIVICRM_CRON_HOLD')) { + // In testing, we may need to simulate some slow activities. + sleep(getenv('CIVICRM_CRON_HOLD')); + } } // load bootstrap to call hooks -- 2.25.1