This commit is contained in:
parent
3dd79479bb
commit
f4e1147f64
|
@ -34,15 +34,11 @@ suite "Autorelay":
|
|||
checkTrackers()
|
||||
|
||||
var
|
||||
rng {.threadvar.}: ref HmacDrbgContext
|
||||
switchRelay {.threadvar.}: Switch
|
||||
switchClient {.threadvar.}: Switch
|
||||
relayClient {.threadvar.}: RelayClient
|
||||
autorelay {.threadvar.}: AutoRelayService
|
||||
|
||||
asyncSetup:
|
||||
rng = newRng()
|
||||
|
||||
asyncTest "Simple test":
|
||||
switchRelay = createSwitch(Relay.new())
|
||||
relayClient = RelayClient.new()
|
||||
|
@ -51,7 +47,7 @@ suite "Autorelay":
|
|||
check: addresses[0] == buildRelayMA(switchRelay, switchClient)
|
||||
check: addresses.len() == 1
|
||||
fut.complete()
|
||||
autorelay = AutoRelayService.new(3, relayClient, checkMA, rng)
|
||||
autorelay = AutoRelayService.new(3, relayClient, checkMA, newRng())
|
||||
switchClient = createSwitch(relayClient, autorelay)
|
||||
await allFutures(switchClient.start(), switchRelay.start())
|
||||
await switchClient.connect(switchRelay.peerInfo.peerId, switchRelay.peerInfo.addrs)
|
||||
|
|
Loading…
Reference in New Issue