mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 10:10:49 -04:00
perf(tests): Remove worked command tests that relies on timeout
It's testing something basic and takes more than a second each time to run. Signed-off-by: Carl Schwan <carlschwan@kde.org>
This commit is contained in:
parent
fea2f67f38
commit
3d4ac4fb15
1 changed files with 0 additions and 16 deletions
|
|
@ -219,22 +219,6 @@ class WorkerCommandTest extends TestCase {
|
|||
$this->assertSame(0, $result);
|
||||
}
|
||||
|
||||
public function testTimeoutExitsLoop(): void {
|
||||
// Arrange: no providers so each iteration does nothing, but timeout=1 should exit quickly
|
||||
$this->manager->method('getProviders')->willReturn([]);
|
||||
|
||||
$input = new ArrayInput(['--timeout' => '1', '--interval' => '0'], $this->command->getDefinition());
|
||||
$output = new NullOutput();
|
||||
|
||||
$start = time();
|
||||
$result = $this->command->run($input, $output);
|
||||
$elapsed = time() - $start;
|
||||
|
||||
$this->assertSame(0, $result);
|
||||
// Should have exited within a few seconds
|
||||
$this->assertLessThanOrEqual(5, $elapsed);
|
||||
}
|
||||
|
||||
public function testProcessesCorrectProviderForReturnedTaskType(): void {
|
||||
$taskTypeId1 = 'type_a';
|
||||
$taskTypeId2 = 'type_b';
|
||||
|
|
|
|||
Loading…
Reference in a new issue