Skip to content

Commit

Permalink
fix: flaky test (#95)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel N <[email protected]>
  • Loading branch information
2color and 2color authored Dec 18, 2024
1 parent 0140ce3 commit c6c2f28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server_routers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,9 @@ func TestFindProviders(t *testing.T) {
require.NoError(t, err)
require.Len(t, results, 5)

require.Len(t, results[0].(*types.PeerRecord).Addrs, 1)
require.Eventually(t, func() bool {
return len(results[0].(*types.PeerRecord).Addrs) == 1
}, time.Second*3, time.Millisecond*100)
require.Equal(t, publicAddr.String(), results[0].(*types.PeerRecord).Addrs[0].String())
})

Expand Down

0 comments on commit c6c2f28

Please sign in to comment.