Skip to content

Commit 500ef1f

Browse files
committed
Revert "Use NativeDriver for tests, as UV has issues with multiple loops leaking"
This reverts commit fdb9010. Uv has been fixed to properly act within cycle collector
1 parent 39e9acd commit 500ef1f

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/LoopReset.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,8 @@
77
use PHPUnit\Framework\Test;
88

99
class LoopReset extends BaseTestListener {
10-
private $previousDriver;
11-
12-
public function startTest(Test $test) {
13-
$this->previousDriver = Loop::get();
14-
Loop::set(new Loop\NativeDriver);
15-
}
16-
1710
public function endTest(Test $test, $time) {
18-
Loop::set($this->previousDriver);
11+
Loop::set((new Loop\DriverFactory)->create());
12+
gc_collect_cycles(); // extensions using an event loop may otherwise leak the file descriptors to the loop
1913
}
2014
}

0 commit comments

Comments
 (0)