Skip to content

Commit

Permalink
fix flaky TestSkipRefreshOnGapCpls (#1021)
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumemichel authored Feb 7, 2025
1 parent b7e9680 commit 646baa9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rtrefresh/rt_refresh_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import (
)

func TestSkipRefreshOnGapCpls(t *testing.T) {
t.Skip("This test is flaky, see https://github.com/libp2p/go-libp2p-kad-dht/issues/722.")

ctx, cancel := context.WithCancel(context.Background())
defer cancel()
local := test.RandPeerIDFatal(t)
Expand All @@ -40,6 +38,10 @@ func TestSkipRefreshOnGapCpls(t *testing.T) {

p, err := rt.GenRandPeerID(uint(u))
require.NoError(t, err)
for rt.Find(p) != "" {
p, err = rt.GenRandPeerID(uint(u))
require.NoError(t, err)
}
b, err := rt.TryAddPeer(p, true, false)
require.NoError(t, err)
require.True(t, b)
Expand Down

0 comments on commit 646baa9

Please sign in to comment.