Skip to content

Commit

Permalink
Reenable flaky bitswap tests (#740)
Browse files Browse the repository at this point in the history
Recent improvements in bitswap should stabalize these tests.

Closes #327
  • Loading branch information
gammazero authored Dec 4, 2024
1 parent 86120e2 commit e9446bb
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions bitswap/client/internal/session/session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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()
Expand All @@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit e9446bb

Please sign in to comment.