mirror of
https://github.com/danog/parallel.git
synced 2025-01-22 14:01:14 +01:00
Cleanup test
This commit is contained in:
parent
30b9a05691
commit
ccf285bdcc
@ -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());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user