From 1350d5312b248128582db6d2ebde8d7ce5349e48 Mon Sep 17 00:00:00 2001 From: cheatfate Date: Wed, 7 Sep 2016 12:19:06 +0300 Subject: Removed tests with `asyncio`. Fix ssl connection drop in asyncnet Add tasyncssl test --- tests/async/tasyncssl.nim | 66 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 tests/async/tasyncssl.nim (limited to 'tests/async/tasyncssl.nim') diff --git a/tests/async/tasyncssl.nim b/tests/async/tasyncssl.nim new file mode 100644 index 000000000..7651d9abe --- /dev/null +++ b/tests/async/tasyncssl.nim @@ -0,0 +1,66 @@ +discard """ + file: "tasyncssl.nim" + cmd: "nim $target --hints:on --define:ssl $options $file" + output: "500" +""" +import asyncdispatch, asyncnet, net, strutils, os + +when defined(ssl): + var msgCount = 0 + + const + swarmSize = 10 + messagesToSend = 50 + + var clientCount = 0 + + proc sendMessages(client: AsyncSocket) {.async.} = + for i in 0 .. Date: Wed, 7 Sep 2016 12:51:18 +0300 Subject: update path to SSL certificates --- tests/async/tasyncssl.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/async/tasyncssl.nim') diff --git a/tests/async/tasyncssl.nim b/tests/async/tasyncssl.nim index 7651d9abe..3dc131036 100644 --- a/tests/async/tasyncssl.nim +++ b/tests/async/tasyncssl.nim @@ -42,8 +42,8 @@ when defined(ssl): proc createServer(port: Port) {.async.} = let serverContext = newContext(verifyMode = CVerifyNone, - certFile = "../testdata/mycert.pem", - keyFile = "../testdata/mycert.pem") + certFile = "tests/testdata/mycert.pem", + keyFile = "tests/testdata/mycert.pem") var server = newAsyncSocket() serverContext.wrapSocket(server) server.setSockOpt(OptReuseAddr, true) -- cgit 1.4.1-2-gfad0