tests: add back test after bootnode dies

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2022-03-16 22:25:12 +01:00
parent 0431587765
commit d14222e8d1
1 changed files with 12 additions and 9 deletions

View File

@ -236,14 +236,17 @@ suite "Providers Tests: 20 nodes":
debug "Providers:", providers
check (providers.len == 1 and providers[0].data.peerId == peerRec0.peerId)
# test "20 nodes, retieve after bootnode dies":
# # TODO: currently this is not working even with a 2 minute timeout
# debug "---- KILLING BOOTSTRAP NODE ---"
# await nodes[0].closeWait()
test "20 nodes, retieve after bootnode dies":
debug "---- KILLING BOOTSTRAP NODE ---"
let (node0, _) = nodes[0]
let (node18, _) = nodes[^2]
await node0.closeWait()
nodes.del(0)
# debug "---- STARTING PROVIDERS LOOKUP ---"
# let providers = await nodes[^2].getProviders(targetId)
# debug "Providers:", providers
debug "---- STARTING PROVIDERS LOOKUP ---"
let providersRes = await node18.getProviders(targetId)
# debug "---- STARTING CHECKS ---"
# check (providers.len == 1 and providers[0].peerId == nodes[0].toPeerRecord.peerId)
debug "---- STARTING CHECKS ---"
let providers = providersRes.get
debug "Providers:", providers
check (providers.len == 1 and providers[0].data.peerId == peerRec0.peerId)