Skip to content

Commit ebf1db7

Browse files
authored
Merge pull request #35 from vrurg/fix-test-flapper
Fix a flapper
2 parents f838890 + 073c878 commit ebf1db7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

t/websocket-client.t

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,7 @@ END { $https-server.stop }
155155

156156
my $p = Promise.new;
157157
$connection.messages.tap(-> $mess {
158-
ok (await $mess.body-text).starts-with('You said:');
159-
$p.keep;
158+
$p.keep: await $mess.body-text
160159
});
161160

162161
$connection.send('Hello');
@@ -166,7 +165,10 @@ END { $https-server.stop }
166165

167166
await Promise.anyof($p, Promise.in(5));
168167

169-
unless $p.status ~~ Kept {
168+
if $p.status ~~ Kept {
169+
ok $p.result.starts-with('You said:'), "Got expected reply";
170+
}
171+
else {
170172
flunk "send does not work";
171173
}
172174

0 commit comments

Comments
 (0)