Skip to content

Commit

Permalink
test: fix race in TestTryAddPeer
Browse files Browse the repository at this point in the history
  • Loading branch information
aschmahmann committed Apr 6, 2020
1 parent 381ce58 commit e79a3b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func TestTryAddPeer(t *testing.T) {

// adding a peer with cpl 0 works if an existing peer has LastSuccessfulOutboundQuery above the max threshold
// because that existing peer will get replaced
require.True(t, rt.UpdateLastSuccessfulOutboundQuery(p2, time.Now().AddDate(0, 0, -1)))
require.True(t, rt.UpdateLastSuccessfulOutboundQuery(p2, time.Now().AddDate(0, 0, -2)))
b, err = rt.TryAddPeer(p3, true)
require.NoError(t, err)
require.True(t, b)
Expand Down

0 comments on commit e79a3b7

Please sign in to comment.