Skip to content

Commit cf6f295

Browse files
committed
Use a less-likely-to-be-in-use port
Test just hangs and then fails if a port is in use and something harder to type at random might not be as likely in use (maybe? :))
1 parent 26aa7da commit cf6f295

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

S17-promise/nonblocking-await.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ PROCESS::<$SCHEDULER> := ThreadPoolScheduler.new(max_threads => 4);
220220
my $kill = Promise.new;
221221
my $started = Promise.new;
222222
my $ok = start react {
223-
whenever IO::Socket::Async.listen('localhost', 3333) -> $conn {
223+
whenever IO::Socket::Async.listen('localhost', 4893) -> $conn {
224224
whenever $conn.Supply(:bin) -> $buf {
225225
await $conn.write: $buf;
226226
$conn.close;
@@ -234,7 +234,7 @@ PROCESS::<$SCHEDULER> := ThreadPoolScheduler.new(max_threads => 4);
234234
my @responses;
235235
for ^20 {
236236
react {
237-
whenever IO::Socket::Async.connect('localhost', 3333) -> $client {
237+
whenever IO::Socket::Async.connect('localhost', 4893) -> $client {
238238
await $client.write('is this thing on?'.encode('ascii'));
239239
whenever $client.Supply(:bin) {
240240
push @responses, .decode('ascii');

0 commit comments

Comments
 (0)