From 22a8afe107e23feefeb5b04f7e1d151f3aa9f2f7 Mon Sep 17 00:00:00 2001 From: Laurent Senta Date: Thu, 3 Mar 2022 10:21:52 +0100 Subject: [PATCH] test: simplify test filter --- internal/decision/engine_test.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/internal/decision/engine_test.go b/internal/decision/engine_test.go index 61fb34ef..a348b748 100644 --- a/internal/decision/engine_test.go +++ b/internal/decision/engine_test.go @@ -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] { @@ -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] }),