Skip to content

Commit

Permalink
simplify test_wakunode_peer_manager
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivansete-status committed Sep 24, 2024
1 parent 0613f00 commit 772131e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/node/test_wakunode_peer_manager.nim
Original file line number Diff line number Diff line change
Expand Up @@ -595,9 +595,7 @@ suite "Peer Manager":
serverPeerStore.get(clientPeerId).connectedness == Connectedness.CanConnect

# When triggering the reconnection
var beforeReconnect = getTime().toUnixFloat()
await client.peerManager.reconnectPeers(WakuRelayCodec)
let reconnectDuration = getTime().toUnixFloat() - beforeReconnect

# Then both peers should be marked as Connected
waitActive:
Expand All @@ -622,8 +620,7 @@ suite "Peer Manager":
check:
clientPeerStore.get(serverPeerId).connectedness == Connectedness.Connected
serverPeerStore.get(clientPeerId).connectedness == Connectedness.Connected
reconnectDurationWithBackoffPeriod >
(reconnectDuration + backoffPeriod.seconds.float)
reconnectDurationWithBackoffPeriod > backoffPeriod.seconds.float

suite "Handling Connections on Different Networks":
# TODO: Implement after discv5 and peer manager's interaction is understood
Expand Down

0 comments on commit 772131e

Please sign in to comment.