# 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, ../json_rpc/[rpcserver, rpcclient, jsonmarshal] const TestsCount = 100 proc simpleTest(address: string): Future[bool] {.async.} = var client = newRpcHttpClient() await client.connect("http://" & address) var r = await client.call("noParamsProc", %[]) if r.string == "\"Hello world\"": result = true proc continuousTest(address: string): Future[int] {.async.} = var client = newRpcHttpClient() result = 0 for i in 0.. seq[byte]: result = newSeq[byte](bigChunkSize) for i in 0..