Skip to content

Commit

Permalink
Try to fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomrsantos committed Sep 29, 2022
1 parent c07edb4 commit 13e0508
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tests/testtortransport.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{.used.}

when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}

import tables
import chronos, stew/[byteutils, endians2]
import ../libp2p/[stream/connection,
Expand Down Expand Up @@ -30,7 +35,7 @@ proc new(
proc registerOnionAddr(self: TorServerStub, key: string, val: string) =
self.addrTable[key] = val

proc start(self: TorServerStub) {.async, raises: [].} =
proc start(self: TorServerStub) {.async.} =
let ma = @[MultiAddress.init(torServer).tryGet()]

await self.tcpTransport.start(ma)
Expand Down Expand Up @@ -58,7 +63,7 @@ proc start(self: TorServerStub) {.async, raises: [].} =

await bridge(connSrc, connDst)

proc stop(self: TorServerStub) {.async, raises: [].} =
proc stop(self: TorServerStub) {.async.} =
await self.tcpTransport.stop()

suite "Tor transport":
Expand All @@ -67,7 +72,7 @@ suite "Tor transport":

asyncTest "test dial and start":

proc startClient() {.async, raises:[].} =
proc startClient() {.async.} =
let s = TorTransport.new(transportAddress = torServer, upgrade = Upgrade())
let ma = MultiAddress.init("/onion3/a2mncbqsbullu7thgm4e6zxda2xccmcgzmaq44oayhdtm6rav5vovcad:80")
let conn = await s.dial("", ma.tryGet())
Expand Down Expand Up @@ -152,7 +157,7 @@ suite "Tor transport":
let serverPeerId = serverSwitch.peerInfo.peerId
let serverAddress = serverSwitch.peerInfo.addrs

proc startClient() {.async, raises:[].} =
proc startClient() {.async.} =
let clientSwitch = SwitchBuilder.new()
.withRng(rng)
.withTorTransport(torServer)
Expand Down

0 comments on commit 13e0508

Please sign in to comment.