# json-rpc # Copyright (c) 2019-2023 Status Research & Development GmbH # Licensed under either of # * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) # * MIT license ([LICENSE-MIT](LICENSE-MIT)) # at your option. # This file may not be copied, modified, or distributed except according to # those terms. import unittest2 import ../json_rpc/[rpcserver, rpcclient] const TestsCount = 100 proc simpleTest(address: string, port: Port): Future[bool] {.async.} = var client = newRpcHttpClient() await client.connect(address, port, secure = false) var r = await client.call("noParamsProc", %[]) if r.string == "\"Hello world\"": result = true proc continuousTest(address: string, port: Port): Future[int] {.async.} = var client = newRpcHttpClient() result = 0 for i in 0..