Skip to content

Commit

Permalink
Update test for runner
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed Jun 8, 2022
1 parent 7edb5fe commit 6488aaf
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/phpunit/CRM/Member/Import/Parser/MembershipTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,17 @@ protected function importCSV(string $csv, array $fieldMappings, array $submitted
$form = $this->getFormObject('CRM_Member_Import_Form_Preview', $submittedValues);
$form->setUserJobID($this->userJobID);
$form->buildForm();
$form->postProcess();
try {
$form->postProcess();
}
catch (CRM_Core_Exception_PrematureExitException $e) {
$queue = Civi::queue('user_job_' . $this->userJobID);
$runner = new CRM_Queue_Runner([
'queue' => $queue,
'errorMode' => CRM_Queue_Runner::ERROR_ABORT,
]);
$runner->runAll();
}
}

/**
Expand Down

0 comments on commit 6488aaf

Please sign in to comment.