Skip to content

Commit

Permalink
JobTest: Remove outdated tests
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
  • Loading branch information
marcelklehr authored and backportbot-nextcloud[bot] committed Jul 28, 2023
1 parent c92baaf commit 070533e
Showing 1 changed file with 0 additions and 52 deletions.
52 changes: 0 additions & 52 deletions tests/lib/BackgroundJob/JobTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,58 +61,6 @@ public function testRemoveAfterError() {
$this->assertCount(1, $jobList->getAll());
}

public function testDisallowParallelRunsWithNoOtherJobs() {
$jobList = new DummyJobList();
$job = new TestJob($this->timeFactory, $this, function () {
});
$job->setAllowParallelRuns(false);
$jobList->add($job);

$jobList->setHasReservedJob(null, false);
$jobList->setHasReservedJob(TestJob::class, false);
$job->start($jobList);
$this->assertTrue($this->run);
}

public function testAllowParallelRunsWithNoOtherJobs() {
$jobList = new DummyJobList();
$job = new TestJob($this->timeFactory, $this, function () {
});
$job->setAllowParallelRuns(true);
$jobList->add($job);

$jobList->setHasReservedJob(null, false);
$jobList->setHasReservedJob(TestJob::class, false);
$job->start($jobList);
$this->assertTrue($this->run);
}

public function testAllowParallelRunsWithOtherJobs() {
$jobList = new DummyJobList();
$job = new TestJob($this->timeFactory, $this, function () {
});
$job->setAllowParallelRuns(true);
$jobList->add($job);

$jobList->setHasReservedJob(null, true);
$jobList->setHasReservedJob(TestJob::class, true);
$job->start($jobList);
$this->assertTrue($this->run);
}

public function testDisallowParallelRunsWithOtherJobs() {
$jobList = new DummyJobList();
$job = new TestJob($this->timeFactory, $this, function () {
});
$job->setAllowParallelRuns(false);
$jobList->add($job);

$jobList->setHasReservedJob(null, true);
$jobList->setHasReservedJob(TestJob::class, true);
$job->start($jobList);
$this->assertFalse($this->run);
}

public function markRun() {
$this->run = true;
}
Expand Down

0 comments on commit 070533e

Please sign in to comment.