Skip to content

Commit

Permalink
debugging ci
Browse files Browse the repository at this point in the history
  • Loading branch information
emizzle committed Oct 23, 2024
1 parent b85bb84 commit cbbbac9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion testmodule/providers/jsonrpc/rpc_mock.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions testmodule/providers/jsonrpc/testJsonRpcSubscriptions.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit cbbbac9

Please sign in to comment.