Skip to content

Commit

Permalink
Test that large blobs can be piped
Browse files Browse the repository at this point in the history
Closes RT#129882. I am unable to reproduce the hang which is mentioned
in the ticket, but this test *is* failing on all builds before 2017.06
with “got: '219264'”.
  • Loading branch information
AlexDaniel committed Feb 2, 2018
1 parent 79dff96 commit 195227f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion S32-io/pipe.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 19;
plan 20;

shell_captures_out_ok '', '', 0, 'Child succeeds but does not print anything';
shell_captures_out_ok 'say 42', '42', 0, 'Child succeeds and prints something';
Expand Down Expand Up @@ -80,3 +80,15 @@ with run(:out, $*EXECUTABLE, '-e', '') -> $proc {
$p.err.slurp(:close);
}, 'bin pipes in Proc do not crash on open';
}

# RT #129882
{
my $proc = run $*EXECUTABLE, '-e', 'print slurp', :in, :out, :bin;
my $input = ('a' x 1_000_000).encode;
my $promise = start {
$proc.in.write: $input;
$proc.in.close;
}
is $proc.out.slurp(:close, :bin).bytes, 1_000_000, 'large blob can be piped';
await $promise;
}

1 comment on commit 195227f

@AlexDaniel
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obvious correction: all releases before 2017.06.

Please sign in to comment.