Skip to content

Commit

Permalink
fix: sync wrapper runner with paratest
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro committed Sep 19, 2023
1 parent 876629b commit 6f54462
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Plugins/Parallel/Paratest/WrapperRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,11 @@ private function startWorker(int $token): WrapperWorker

private function destroyWorker(int $token): void
{
// Mutation Testing tells us that the following `unset()` already destroys
// the `WrapperWorker`, which destroys the Symfony's `Process`, which
// automatically calls `Process::stop` within `Process::__destruct()`.
// But we prefer to have an explicit stops.
$this->workers[$token]->stop();
// We need to wait for ApplicationForWrapperWorker::end to end
while ($this->workers[$token]->isRunning()) {
usleep(self::CYCLE_SLEEP);
}

unset($this->workers[$token]);
}
Expand Down

0 comments on commit 6f54462

Please sign in to comment.