mirror of
https://github.com/danog/byte-stream.git
synced 2024-11-26 20:04:51 +01:00
Revert "Update test"
This reverts commit 5ba0469d7a
.
The test should verify that the socket is detected as closed even if the
work is still alive and has an open FD.
This commit is contained in:
parent
5ba0469d7a
commit
1184827fd8
@ -4,7 +4,6 @@ namespace Amp\ByteStream\Test;
|
||||
|
||||
use Amp\ByteStream\ResourceOutputStream;
|
||||
use Amp\ByteStream\StreamException;
|
||||
use Amp\Delayed;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use function Amp\Promise\wait;
|
||||
|
||||
@ -71,7 +70,7 @@ class ResourceOutputStreamTest extends TestCase {
|
||||
|
||||
// Creates a fork without having to deal with it…
|
||||
// The fork inherits the FDs of the current process.
|
||||
$proc = \proc_open("sleep 1", [
|
||||
$proc = \proc_open("sleep 3", [
|
||||
['pipe', 'r'],
|
||||
['pipe', 'w'],
|
||||
['pipe', 'w'],
|
||||
@ -84,8 +83,6 @@ class ResourceOutputStreamTest extends TestCase {
|
||||
$this->expectException(StreamException::class);
|
||||
$this->expectExceptionMessage("Failed to write to stream; fwrite():");
|
||||
|
||||
wait(new Delayed(2000));
|
||||
|
||||
try {
|
||||
// The first write still succeeds somehow...
|
||||
wait($stream->write("foobar"));
|
||||
|
Loading…
Reference in New Issue
Block a user