Skip to content

Commit

Permalink
hotfix #14320 tasyncawait.nim is recently very flaky
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed May 12, 2020
1 parent de74362 commit 1e85a5a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/async/tasyncawait.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1e85a5a

Please sign in to comment.