Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions tests/ClassifierTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function testSchedulerJob() : void {

$scheduler->setId(1);
$scheduler->setLastRun(0);
$scheduler->execute($this->jobList);
$scheduler->start($this->jobList);

$storageId = $this->testFile->getMountPoint()->getNumericStorageId();
$rootId = $this->testFile->getMountPoint()->getStorageRootId();
Expand Down Expand Up @@ -324,7 +324,7 @@ public function testImagenetPipeline(string $ignoreFileName) : void {
]);
$crawler->setId(1);
$crawler->setLastRun(0);
$crawler->execute($this->jobList);
$crawler->start($this->jobList);

// clean up
$this->jobList->remove(StorageCrawlJob::class);
Expand All @@ -339,7 +339,7 @@ public function testImagenetPipeline(string $ignoreFileName) : void {
'imagenet queue should contain exactly one image');

list($classifier) = $this->jobList->getJobs(ClassifyImagenetJob::class, 1, 0);
$classifier->execute($this->jobList);
$classifier->start($this->jobList);

/** @var \OCP\SystemTag\ISystemTagObjectMapper $objectMapper */
$objectMapper = \OC::$server->get(ISystemTagObjectMapper::class);
Expand Down Expand Up @@ -397,7 +397,7 @@ public function testLandmarksPipeline() : void {
]);
$crawler->setId(1);
$crawler->setLastRun(0);
$crawler->execute($this->jobList);
$crawler->start($this->jobList);

// clean up
$this->jobList->remove(StorageCrawlJob::class);
Expand All @@ -415,7 +415,7 @@ public function testLandmarksPipeline() : void {
'imagenet queue should contain image');

list($classifier, ) = $this->jobList->getJobs(ClassifyImagenetJob::class, 1, 0);
$classifier->execute($this->jobList);
$classifier->start($this->jobList);

self::assertTrue($this->jobList->has(ClassifyLandmarksJob::class, [
'storageId' => $storageId,
Expand All @@ -427,7 +427,7 @@ public function testLandmarksPipeline() : void {
'landmarks queue should contain image');

list($classifier, ) = $this->jobList->getJobs(ClassifyLandmarksJob::class, 1, 0);
$classifier->execute($this->jobList);
$classifier->start($this->jobList);

/** @var \OCP\SystemTag\ISystemTagObjectMapper $objectMapper */
$objectMapper = \OC::$server->get(ISystemTagObjectMapper::class);
Expand Down Expand Up @@ -483,11 +483,11 @@ public function testFacesPipeline() : void {
]);
$crawler->setId(1);
$crawler->setLastRun(0);
$crawler->execute($this->jobList);
$crawler->start($this->jobList);

while (count($jobs = $this->jobList->getJobs(StorageCrawlJob::class, 1, 0)) > 0) {
list($crawler) = $jobs;
$crawler->execute($this->jobList);
$crawler->start($this->jobList);
}

self::assertTrue($this->jobList->has(ClassifyFacesJob::class, [
Expand All @@ -500,7 +500,7 @@ public function testFacesPipeline() : void {
'faces queue should contain images');

list($classifier, ) = $this->jobList->getJobs(ClassifyFacesJob::class, 1, 0);
$classifier->execute($this->jobList);
$classifier->start($this->jobList);

self::assertGreaterThan(10,
count($this->faceDetectionMapper->findByUserId(self::TEST_USER1)),
Expand All @@ -511,7 +511,7 @@ public function testFacesPipeline() : void {
]), 'ClusterFacesJob should have been scheduled');

list($clusterer, ) = $this->jobList->getJobs(ClusterFacesJob::class, 1, 0);
$clusterer->execute($this->jobList);
$clusterer->start($this->jobList);

/** @var FaceClusterMapper $clusterMapper */
$clusterMapper = \OC::$server->get(FaceClusterMapper::class);
Expand Down Expand Up @@ -581,11 +581,11 @@ public function testMovinetPipeline(string $ignoreFileName) : void {
]);
$crawler->setId(1);
$crawler->setLastRun(0);
$crawler->execute($this->jobList);
$crawler->start($this->jobList);

while (count($jobs = $this->jobList->getJobs(StorageCrawlJob::class, 1, 0)) > 0) {
list($crawler) = $jobs;
$crawler->execute($this->jobList);
$crawler->start($this->jobList);
}

self::assertTrue($this->jobList->has(ClassifyMovinetJob::class, [
Expand All @@ -598,7 +598,7 @@ public function testMovinetPipeline(string $ignoreFileName) : void {
'movinet queue should contain exactly one entry');

list($classifier) = $this->jobList->getJobs(ClassifyMovinetJob::class, 1, 0);
$classifier->execute($this->jobList);
$classifier->start($this->jobList);

/** @var \OCP\SystemTag\ISystemTagObjectMapper $objectMapper */
$objectMapper = \OC::$server->get(ISystemTagObjectMapper::class);
Expand Down Expand Up @@ -665,11 +665,11 @@ public function testMusicnnPipeline(string $ignoreFileName) : void {
]);
$crawler->setId(1);
$crawler->setLastRun(0);
$crawler->execute($this->jobList);
$crawler->start($this->jobList);

while (count($jobs = $this->jobList->getJobs(StorageCrawlJob::class, 1, 0)) > 0) {
list($crawler) = $jobs;
$crawler->execute($this->jobList);
$crawler->start($this->jobList);
}

self::assertTrue($this->jobList->has(ClassifyMusicnnJob::class, [
Expand All @@ -682,7 +682,7 @@ public function testMusicnnPipeline(string $ignoreFileName) : void {
'movinet queue should contain exactly one entry');

list($classifier) = $this->jobList->getJobs(ClassifyMusicnnJob::class, 1, 0);
$classifier->execute($this->jobList);
$classifier->start($this->jobList);

/** @var \OCP\SystemTag\ISystemTagObjectMapper $objectMapper */
$objectMapper = \OC::$server->get(ISystemTagObjectMapper::class);
Expand Down
Loading