This commit is contained in:
Ludovic Chenut 2022-12-21 11:05:20 +01:00
parent 3dd79479bb
commit f4e1147f64
No known key found for this signature in database
GPG Key ID: D9A59B1907F1D50C
1 changed files with 1 additions and 5 deletions

View File

@ -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)