8000 Reduces fwrite() call length to one chunk · reactphp/event-loop@7539cf9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7539cf9

Browse files
committed
Reduces fwrite() call length to one chunk
1 parent 502b4b6 commit 7539cf9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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
// HHVM is a bit slow, so give it more time
@@ -228,7 +230,7 @@ public function testRemoveReadAndWriteStreamFromLoopOnceResourceClosesOnEndOfFil
228230
});
229231

230232
// send data and close stream
231-
fwrite($other, str_repeat('.', 60000));
233+
fwrite($other, str_repeat('.', static::PHP_DEFAULT_CHUNK_SIZE));
232234
$this->loop->addTimer(0.01, function () use ($other) {
233235
fclose($other);
234236
});

0 commit comments

Comments
 (0)
0