mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
Fix broken async tests.
This commit is contained in:
@@ -61,11 +61,11 @@ proc createServer(port: TPort) {.async.} =
|
||||
discard server.TSocketHandle.listen()
|
||||
while true:
|
||||
var client = await accept(server)
|
||||
readMessages(client)
|
||||
asyncCheck readMessages(client)
|
||||
# TODO: Test: readMessages(disp, await disp.accept(server))
|
||||
|
||||
createServer(TPort(10335))
|
||||
launchSwarm(TPort(10335))
|
||||
asyncCheck createServer(TPort(10335))
|
||||
asyncCheck launchSwarm(TPort(10335))
|
||||
while true:
|
||||
poll()
|
||||
if clientCount == swarmSize: break
|
||||
|
||||
@@ -36,4 +36,4 @@ proc main {.async.} =
|
||||
discard await g()
|
||||
echo 6
|
||||
|
||||
main()
|
||||
asyncCheck main()
|
||||
|
||||
@@ -5,4 +5,4 @@ proc main {.async.} =
|
||||
await newAsyncSocket().connect("www.google.com", TPort(80))
|
||||
let x = await f()
|
||||
|
||||
main()
|
||||
asyncCheck main()
|
||||
|
||||
Reference in New Issue
Block a user