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

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
// 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy