Skip to content

Commit

Permalink
Fix handling of wg in the networking dial test (#2132)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenButtolph authored Oct 3, 2023
1 parent 903a588 commit 0022f37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion network/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,6 @@ func TestDialDeletesNonValidators(t *testing.T) {
// causes dial to return immediately.
func TestDialContext(t *testing.T) {
_, networks, wg := newFullyConnectedTestNetwork(t, []router.InboundHandler{nil})
defer wg.Done()

dialer := newTestDialer()
network := networks[0]
Expand Down Expand Up @@ -689,4 +688,7 @@ func TestDialContext(t *testing.T) {
require.FailNow(t, "unexpectedly connected to peer")
default:
}

network.StartClose()
wg.Wait()
}

0 comments on commit 0022f37

Please sign in to comment.