Test teststream2 renamed to testserver.

Fix compilation errors.
This commit is contained in:
cheatfate 2018-05-31 11:10:32 +03:00
parent 67896b161d
commit 6985626e1c
3 changed files with 4 additions and 5 deletions

View File

@ -38,6 +38,6 @@ task test, "Run all tests":
exec "nim c -r tests/teststream" exec "nim c -r tests/teststream"
exec "nim c -r -d:release tests/teststream" exec "nim c -r -d:release tests/teststream"
exec "nim c -r -d:useSysAssert -d:useGcAssert tests/teststream2" exec "nim c -r -d:useSysAssert -d:useGcAssert tests/testserver"
exec "nim c -r tests/teststream2" exec "nim c -r tests/testserver"
exec "nim c -r -d:release tests/teststream2" exec "nim c -r -d:release tests/testserver"

View File

@ -274,7 +274,6 @@ proc test4(): Future[int] {.async.} =
server.close() server.close()
when isMainModule: when isMainModule:
echo waitFor(test4())
const const
m1 = "Unbounded test (" & $TestsCount & " messages)" m1 = "Unbounded test (" & $TestsCount & " messages)"
m2 = "Bounded test (" & $TestsCount & " messages)" m2 = "Bounded test (" & $TestsCount & " messages)"

View File

@ -48,7 +48,7 @@ proc swarmWorker1(address: TransportAddress): Future[int] {.async.} =
proc test1(): Future[int] {.async.} = proc test1(): Future[int] {.async.} =
var ta = strAddress("127.0.0.1:31354") var ta = strAddress("127.0.0.1:31354")
var server = createStreamServer(ta, {ReuseAddr}, serveClient1) var server = createStreamServer(ta, serveClient1, {ReuseAddr})
server.start() server.start()
result = await swarmWorker1(ta) result = await swarmWorker1(ta)
server.stop() server.stop()