Skip to content

Commit 945205d

Browse files
authored
Merge pull request #161 from nawarian/fix_stream_select_loop_test
Removes I/O dependency at StreamSelectLoopTest to fix Mac OS X tests
2 parents b12a79a + 1ee5a23 commit 945205d

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)