diff --git a/tests/integration/multinodes.nim b/tests/integration/multinodes.nim index 1f2728ca..552e7c37 100644 --- a/tests/integration/multinodes.nim +++ b/tests/integration/multinodes.nim @@ -90,7 +90,7 @@ template multinodesuite*(suiteName: string, body: untyped) = # .withEthProvider("ws://localhost:8545") # .some, # ... - var jsonRpcProviderUrl = "http://127.0.0.1:" & $HardhatPort + var jsonRpcProviderUrl = "ws://localhost:" & $HardhatPort var running {.inject, used.}: seq[RunningNode] var bootstrapNodes: seq[string] let starttime = now().format("yyyy-MM-dd'_'HH:mm:ss") @@ -324,7 +324,11 @@ template multinodesuite*(suiteName: string, body: untyped) = except ProviderError as e: error "Failed to revert hardhat state during teardown", error = e.msg - await ethProvider.close() + # TODO: JsonRpcProvider.close should NOT raise any exceptions + try: + await ethProvider.close() + except CatchableError: + discard running = @[] diff --git a/tests/integration/testcli.nim b/tests/integration/testcli.nim index 4fd33378..f5dd3e62 100644 --- a/tests/integration/testcli.nim +++ b/tests/integration/testcli.nim @@ -74,7 +74,7 @@ asyncchecksuite "Command line interface": let node = await startCodex( @[ "persistence", - "--eth-provider=" & "http://127.0.0.1:" & $HardhatPort, + "--eth-provider=" & "ws://localhost:" & $HardhatPort, "--eth-private-key=" & unsafeKeyFile, ] ) @@ -98,7 +98,7 @@ asyncchecksuite "Command line interface": let node = await startCodex( @[ "persistence", - "--eth-provider=" & "http://127.0.0.1:" & $HardhatPort, + "--eth-provider=" & "ws://localhost:" & $HardhatPort, "prover", marketplaceArg, "--circom-r1cs=tests/circuits/fixtures/proof_main.r1cs", @@ -111,7 +111,7 @@ asyncchecksuite "Command line interface": let node = await startCodex( @[ "persistence", - "--eth-provider=" & "http://127.0.0.1:" & $HardhatPort, + "--eth-provider=" & "ws://localhost:" & $HardhatPort, "prover", marketplaceArg, "--circom-r1cs=tests/circuits/fixtures/proof_main.r1cs",