From: Tim Otten Date: Tue, 12 May 2015 04:02:33 +0000 (-0700) Subject: CRM_Mailing_BAO_Mailing::processQueue - Allow tests to prolong the critical section X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a6264bc1e5b0ecbedf16a3cd946acb4099f53114;p=civicrm-core.git CRM_Mailing_BAO_Mailing::processQueue - Allow tests to prolong the critical section --- 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