From f8bebb56be09347fda2e4d6b94892ba61379fdb3 Mon Sep 17 00:00:00 2001 From: gammazero <11790789+gammazero@users.noreply.github.com> Date: Wed, 4 Dec 2024 08:37:00 -1000 Subject: [PATCH] Reenable flaky bitswap tests Recent improvements in bitswap should stabalize these tests. Closes #327 --- bitswap/client/internal/session/session_test.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/bitswap/client/internal/session/session_test.go b/bitswap/client/internal/session/session_test.go index 2dd1e1be6..5e6655124 100644 --- a/bitswap/client/internal/session/session_test.go +++ b/bitswap/client/internal/session/session_test.go @@ -12,7 +12,6 @@ import ( bspm "github.com/ipfs/boxo/bitswap/client/internal/peermanager" bssim "github.com/ipfs/boxo/bitswap/client/internal/sessioninterestmanager" bsspm "github.com/ipfs/boxo/bitswap/client/internal/sessionpeermanager" - "github.com/ipfs/boxo/internal/test" blocks "github.com/ipfs/go-block-format" cid "github.com/ipfs/go-cid" delay "github.com/ipfs/go-ipfs-delay" @@ -155,8 +154,6 @@ func (pm *fakePeerManager) BroadcastWantHaves(ctx context.Context, cids []cid.Ci func (pm *fakePeerManager) SendCancels(ctx context.Context, cancels []cid.Cid) {} func TestSessionGetBlocks(t *testing.T) { - test.Flaky(t) - ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) fpm := newFakePeerManager() fspm := newFakeSessionPeerManager() @@ -175,9 +172,7 @@ func TestSessionGetBlocks(t *testing.T) { } _, err := session.GetBlocks(ctx, cids) - if err != nil { - t.Fatal("error getting blocks") - } + require.NoError(t, err, "error getting blocks") // Wait for initial want request receivedWantReq := <-fpm.wantReqs @@ -345,8 +340,6 @@ func TestSessionOnPeersExhausted(t *testing.T) { } func TestSessionFailingToGetFirstBlock(t *testing.T) { - test.Flaky(t) - ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) defer cancel() fpm := newFakePeerManager()