Skip to content

Commit 84de5da

Browse files
authored
Merge pull request #147 from nawarian/fix_test_issue_146
Reduces fwrite() call length to one chunk
2 parents 1fb6a4b + 7539cf9 commit 84de5da

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/AbstractLoopTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ abstract class AbstractLoopTest extends TestCase
1111

1212
private $tickTimeout;
1313

14+
const PHP_DEFAULT_CHUNK_SIZE = 8192;
15+
1416
public function setUp()
1517
{
1618
// It's a timeout, don't set it too low. Travis and other CI systems are slow.
@@ -232,7 +234,7 @@ public function testRemoveReadAndWriteStreamFromLoopOnceResourceClosesOnEndOfFil
232234
});
233235

234236
// send data and close stream
235-
fwrite($other, str_repeat('.', 60000));
237+
fwrite($other, str_repeat('.', static::PHP_DEFAULT_CHUNK_SIZE));
236238
$this->loop->addTimer(0.01, function () use ($other) {
237239
fclose($other);
238240
});

0 commit comments

Comments
 (0)