From 74445ddf8a37ef2d880febf5ccf76a160244f2ea Mon Sep 17 00:00:00 2001 From: Zoffix Znet Date: Wed, 25 Oct 2017 00:24:35 -0400 Subject: [PATCH] Add test for hang in supply in a sock https://github.com/tokuhirom/p6-WebSocket/issues/15#issuecomment-339120879 RT #132343 --- MISC/bug-coverage-stress.t | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/MISC/bug-coverage-stress.t b/MISC/bug-coverage-stress.t index c5c9ec5264..ce369c2fbd 100644 --- a/MISC/bug-coverage-stress.t +++ b/MISC/bug-coverage-stress.t @@ -7,7 +7,7 @@ use Test::Util; # or ones that need to be only part of strestest and not spectest. # Feel free to move the tests to more appropriate places. -plan 4; +plan 5; # RT #132042 doesn't-hang 「 @@ -83,4 +83,20 @@ with make-temp-dir() -> $dir { } } +# https://github.com/tokuhirom/p6-WebSocket/issues/15#issuecomment-339120879 +# RT #132343 +is_run 「 + start react whenever IO::Socket::Async.listen: '127.0.0.1', 15555 { + supply { + whenever $_ { + print 'pass'; + exit; + } + }.list + } + sleep .2; + .print: "x\n" with IO::Socket::INET.new: :host<127.0.0.1>, :15555port; + sleep 2; +」, {:out, :err(''), :0status}, 'supply inside sock does not hang'; + # vim: expandtab shiftwidth=4 ft=perl6