diff --git a/testmodule/providers/jsonrpc/rpc_mock.nim b/testmodule/providers/jsonrpc/rpc_mock.nim index d9cae74..e747ada 100644 --- a/testmodule/providers/jsonrpc/rpc_mock.nim +++ b/testmodule/providers/jsonrpc/rpc_mock.nim @@ -14,7 +14,7 @@ type MockRpcHttpServer* = ref object srv: RpcHttpServer proc new*(_: type MockRpcHttpServer): MockRpcHttpServer = - MockRpcHttpServer(filters: initTable[string, bool](), newFilterCounter: 0, srv: newRpcHttpServer(["127.0.0.1:0"])) + MockRpcHttpServer(filters: initTable[string, bool](), newFilterCounter: 0, srv: newRpcHttpServer(["127.0.0.1:65080"])) proc invalidateFilter*(server: MockRpcHttpServer, id: string) = server.filters[id] = false diff --git a/testmodule/providers/jsonrpc/testJsonRpcSubscriptions.nim b/testmodule/providers/jsonrpc/testJsonRpcSubscriptions.nim index d26f8d8..48342ca 100644 --- a/testmodule/providers/jsonrpc/testJsonRpcSubscriptions.nim +++ b/testmodule/providers/jsonrpc/testJsonRpcSubscriptions.nim @@ -103,15 +103,24 @@ suite "HTTP polling subscriptions - filter not found": var mockServer: MockRpcHttpServer setup: + echo "Creating MockRpcHttpServer instance" mockServer = MockRpcHttpServer.new() + echo "Starting MockRpcHttpServer..." mockServer.start() + echo "Started MockRpcHttpServer" + echo "Creating new RpcHttpClient instance..." client = newRpcHttpClient() + echo "Connecting RpcHttpClient to MockRpcHttpServer..." await client.connect("http://" & $mockServer.localAddress()[0]) + echo "Connected RpcHttpClient to MockRpcHttpServer" + echo "Creating new JsonRpcSubscriptions instance..." subscriptions = JsonRpcSubscriptions.new(client, pollingInterval = 15.millis) + echo "Starting JsonRpcSubscriptions..." subscriptions.start() + echo "Started JsonRpcSubscriptions" teardown: await subscriptions.close()