diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-21 09:47:07 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-21 09:47:07 +0100 |
commit | 0b913f00c7e49c57d2e0068854b5d4c133b0cb36 (patch) | |
tree | 51d1c6e25d73ac651000d209820ce0090393f9de /tests | |
parent | a635975d19873ba660bc378d45da722ae09dea74 (diff) | |
parent | 54558bb5b296740233036601d2b3eb7f87ee48c4 (diff) | |
download | nextcloud-server-0b913f00c7e49c57d2e0068854b5d4c133b0cb36.tar.gz nextcloud-server-0b913f00c7e49c57d2e0068854b5d4c133b0cb36.zip |
Merge pull request #21289 from owncloud/issue-20399-keep-periodic-background-jobs
Do not delete background jobs, in case an exception occured
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/backgroundjob/job.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/lib/backgroundjob/job.php b/tests/lib/backgroundjob/job.php index fec9b0a792d..912e0e13b57 100644 --- a/tests/lib/backgroundjob/job.php +++ b/tests/lib/backgroundjob/job.php @@ -23,10 +23,17 @@ class Job extends \Test\TestCase { }); $jobList->add($job); + $logger = $this->getMockBuilder('OCP\ILogger') + ->disableOriginalConstructor() + ->getMock(); + $logger->expects($this->once()) + ->method('error') + ->with('Error while running background job: '); + $this->assertCount(1, $jobList->getAll()); - $job->execute($jobList); + $job->execute($jobList, $logger); $this->assertTrue($this->run); - $this->assertCount(0, $jobList->getAll()); + $this->assertCount(1, $jobList->getAll()); } public function markRun() { |