1
0
mirror of https://github.com/danog/parallel.git synced 2025-01-22 14:01:14 +01:00

Cleanup test

This commit is contained in:
Aaron Piotrowski 2018-12-30 13:32:25 -06:00
parent 30b9a05691
commit ccf285bdcc
No known key found for this signature in database
GPG Key ID: ADD1EF783EDE9EEB

View File

@ -204,17 +204,14 @@ abstract class AbstractPoolTest extends TestCase
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());
});
}
}