mirror of
https://github.com/status-im/nim-ethers.git
synced 2025-02-17 17:47:35 +00:00
debugging ci
This commit is contained in:
parent
b85bb84e3b
commit
cbbbac9f4e
@ -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
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user