Move exception handling from concrete workers into processTask() [MAILPOET-2385]
This commit is contained in:
@@ -26,7 +26,7 @@ class SingleInstanceSimpleWorkerTest extends \MailPoetTest {
|
||||
expect($this->worker->processTask($task))->equals(false);
|
||||
}
|
||||
|
||||
function testItWillKeepTheInProgressFlagOnFail() {
|
||||
function testItWillResetTheInProgressFlagOnFail() {
|
||||
$task = $this->createScheduledTask();
|
||||
$this->worker->expects($this->once())
|
||||
->method('processTaskStrategy')
|
||||
@@ -36,7 +36,7 @@ class SingleInstanceSimpleWorkerTest extends \MailPoetTest {
|
||||
$this->fail('An exception should be thrown');
|
||||
} catch (\Exception $e) {
|
||||
expect($e->getMessage())->equals('test error');
|
||||
expect(empty($task->getMeta()['in_progress']))->equals(false);
|
||||
expect(empty($task->getMeta()['in_progress']))->equals(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user