diff --git a/test/Worker/AbstractPoolTest.php b/test/Worker/AbstractPoolTest.php index 62f60d2..985cedf 100644 --- a/test/Worker/AbstractPoolTest.php +++ b/test/Worker/AbstractPoolTest.php @@ -201,4 +201,20 @@ 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); + } }