Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Commit

Permalink
test: simplify test filter
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentsenta committed Mar 3, 2022
1 parent 6410902 commit 22a8afe
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions internal/decision/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1138,9 +1138,7 @@ func TestPeerBlockFilter(t *testing.T) {
t.Fatal(err)
}

// use a single task worker so that the order of outgoing messages is deterministic
engineTaskWorkerCount := 1
e := newEngineForTesting(ctx, bs, 4, engineTaskWorkerCount, defaults.BitswapMaxOutstandingBytesPerPeer, fpt, "localhost", 0, sl,
e := newEngineForTesting(ctx, bs, 4, defaults.BitswapEngineTaskWorkerCount, defaults.BitswapMaxOutstandingBytesPerPeer, fpt, "localhost", 0, sl,
WithPeerBlockRequestFilter(func(p peer.ID, c cid.Cid) bool {
// peer 0 has access to everything
if p == peerIDs[0] {
Expand Down Expand Up @@ -1297,9 +1295,7 @@ func TestPeerBlockFilterMutability(t *testing.T) {

filterAllowList := make(map[cid.Cid]bool)

// use a single task worker so that the order of outgoing messages is deterministic
engineTaskWorkerCount := 1
e := newEngineForTesting(ctx, bs, 4, engineTaskWorkerCount, defaults.BitswapMaxOutstandingBytesPerPeer, fpt, "localhost", 0, sl,
e := newEngineForTesting(ctx, bs, 4, defaults.BitswapEngineTaskWorkerCount, defaults.BitswapMaxOutstandingBytesPerPeer, fpt, "localhost", 0, sl,
WithPeerBlockRequestFilter(func(p peer.ID, c cid.Cid) bool {
return filterAllowList[c]
}),
Expand Down

0 comments on commit 22a8afe

Please sign in to comment.