From 1e85a5ad9d65e356feea7f617083fb8ff5450bfa Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Tue, 12 May 2020 09:49:23 -0700 Subject: [PATCH] hotfix #14320 tasyncawait.nim is recently very flaky --- tests/async/tasyncawait.nim | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/async/tasyncawait.nim b/tests/async/tasyncawait.nim index a52b0953d7265..b20485a57a5f9 100644 --- a/tests/async/tasyncawait.nim +++ b/tests/async/tasyncawait.nim @@ -57,8 +57,15 @@ proc createServer(port: Port) {.async.} = while true: asyncCheck readMessages(await accept(server)) -asyncCheck createServer(Port(10335)) -asyncCheck launchSwarm(Port(10335)) +# refs https://github.com/nim-lang/Nim/issues/14320 +# tests/arc/tasyncawait.nim uses 10335 and probably explains +# `Address already in use` errro so we use a different port. This is +# just a workaround while waiting for a cleaner fix that would wait +# (with deadline) for a port to become available. +# Note that this port is already used in other tests. +let port = 10335 + 1 +asyncCheck createServer(Port(port)) +asyncCheck launchSwarm(Port(port)) while true: poll() if clientCount == swarmSize: break