debugging ci

This commit is contained in:
Eric 2024-10-23 18:33:36 +11:00
parent b85bb84e3b
commit cbbbac9f4e
No known key found for this signature in database
2 changed files with 10 additions and 1 deletions

View File

@ -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

View File

@ -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()