Fix code breakage after the rebase
This commit is contained in:
parent
3599a73b58
commit
7ab1b31614
|
@ -28,4 +28,7 @@ proc buildBinary(name: string, srcDir = "./", params = "", cmdParams = "", lang
|
|||
exec "nim " & lang & " --out:./build/" & name & " " & params & " " & srcDir & name & ".nim" & " " & cmdParams
|
||||
|
||||
task test, "run tests":
|
||||
buildBinary "all", "tests/", "-r -f --hints:off --debuginfo --path:'.' --threads:on -d:chronicles_log_level=ERROR", getLang()
|
||||
buildBinary "all", "tests/",
|
||||
params = "-r -f --hints:off --debuginfo --path:'.' --threads:on -d:chronicles_log_level=ERROR",
|
||||
cmdParams = "",
|
||||
lang = getLang()
|
||||
|
|
|
@ -100,7 +100,7 @@ proc registerProxyMethod*(proxy: var RpcProxy, methodName: string) =
|
|||
|
||||
proc stop*(proxy: RpcProxy) {.async.} =
|
||||
await proxy.getClient().close()
|
||||
proxy.rpcHttpServer.stop()
|
||||
await proxy.rpcHttpServer.stop()
|
||||
|
||||
proc closeWait*(proxy: RpcProxy) {.async.} =
|
||||
await proxy.rpcHttpServer.closeWait()
|
||||
|
|
|
@ -134,7 +134,7 @@ proc new*(T: type RpcHttpServer): T =
|
|||
T(router: RpcRouter.init(), httpServers: @[])
|
||||
|
||||
proc new*(T: type RpcHttpServer, router: RpcRouter): T =
|
||||
T(router: router, servers: @[])
|
||||
T(router: router, httpServers: @[])
|
||||
|
||||
proc newRpcHttpServer*(): RpcHttpServer =
|
||||
RpcHttpServer.new()
|
||||
|
@ -155,12 +155,12 @@ proc newRpcHttpServer*(addresses: openArray[string]): RpcHttpServer =
|
|||
proc newRpcHttpServer*(addresses: openArray[string], router: RpcRouter): RpcHttpServer =
|
||||
## Create new server and assign it to addresses ``addresses``.
|
||||
result = newRpcHttpServer(router)
|
||||
result.addStreamServers(addresses)
|
||||
result.addHttpServers(addresses)
|
||||
|
||||
proc newRpcHttpServer*(addresses: openArray[TransportAddress], router: RpcRouter): RpcHttpServer =
|
||||
## Create new server and assign it to addresses ``addresses``.
|
||||
result = newRpcHttpServer(router)
|
||||
result.addStreamServers(addresses)
|
||||
result.addHttpServers(addresses)
|
||||
|
||||
proc start*(server: RpcHttpServer) =
|
||||
## Start the RPC server.
|
||||
|
|
|
@ -40,7 +40,7 @@ suite "Proxy RPC through http":
|
|||
expect(CatchableError):
|
||||
discard waitFor client.call("missingMethod", %[%"abc"])
|
||||
|
||||
srv.stop()
|
||||
waitFor srv.stop()
|
||||
waitFor srv.closeWait()
|
||||
waitFor proxy.stop()
|
||||
waitFor proxy.closeWait()
|
||||
|
|
Loading…
Reference in New Issue