Skip to content

Commit

Permalink
Cleanup test
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Dec 30, 2018
1 parent 30b9a05 commit ccf285b
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions test/Worker/AbstractPoolTest.php
Expand Up @@ -204,17 +204,14 @@ public function testCleanGarbageCollection()

public function testPooledKill()
{
$exception = null;
try {
Loop::run(function () {
$pool = $this->createPool(1);
$worker = $pool->getWorker();
$worker->kill();
$worker2 = $pool->getWorker();
unset($worker); // Invoke destructor.
});
} catch (\Throwable $exception) {
}
$this->assertNull($exception);
// See https://github.com/amphp/parallel/issues/66
Loop::run(function () {
$pool = $this->createPool(1);
$worker = $pool->getWorker();
$worker->kill();
$worker2 = $pool->getWorker();
unset($worker); // Invoke destructor.
$this->assertTrue($worker2->isRunning());
});
}
}

0 comments on commit ccf285b

Please sign in to comment.