Skip to content

Commit 1ee5a23

Browse files
committed
Removes I/O dependency at StreamSelectLoopTest
1 parent e1e0647 commit 1ee5a23

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

tests/AbstractLoopTest.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -579,16 +579,11 @@ public function testSignalsKeepTheLoopRunningAndRemovingItStopsTheLoop()
579579

580580
public function testTimerIntervalCanBeFarInFuture()
581581
{
582-
// get only one part of the pair to ensure the other side will close immediately
583-
list($stream) = $this->createSocketPair();
584-
582+
$loop = $this->loop;
585583
// start a timer very far in the future
586584
$timer = $this->loop->addTimer(PHP_INT_MAX, function () { });
587585

588-
// remove stream and timer when the stream is readable (closes)
589-
$loop = $this->loop;
590-
$this->loop->addReadStream($stream, function ($stream) use ($timer, $loop) {
591-
$loop->removeReadStream($stream);
586+
$this->loop->futureTick(function () use ($timer, $loop) {
592587
$loop->cancelTimer($timer);
593588
});
594589

0 commit comments

Comments
 (0)