From 3b4df5e10df1bd59f39eb7472358e58d4fa91e8d Mon Sep 17 00:00:00 2001 From: hannahhoward Date: Fri, 16 Jul 2021 11:46:03 -0700 Subject: [PATCH] fix(itests): fix simultaneous transfer logic limit parallelism on client side and also fix the issue with how ongoing transfers are detected --- itests/deals_concurrent_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/itests/deals_concurrent_test.go b/itests/deals_concurrent_test.go index 716be04e1..56b3f7b15 100644 --- a/itests/deals_concurrent_test.go +++ b/itests/deals_concurrent_test.go @@ -14,7 +14,6 @@ import ( "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/lotus/api" - "github.com/filecoin-project/lotus/chain/actors/policy" "github.com/filecoin-project/lotus/itests/kit" "github.com/filecoin-project/lotus/node" "github.com/filecoin-project/lotus/node/modules" @@ -138,6 +137,7 @@ func TestSimultanenousTransferLimit(t *testing.T) { runTest := func(t *testing.T) { client, miner, ens := kit.EnsembleMinimal(t, kit.MockProofs(), kit.ConstructorOpts( node.ApplyIf(node.IsType(repo.StorageMiner), node.Override(new(dtypes.StagingGraphsync), modules.StagingGraphsync(graphsyncThrottle))), + node.Override(new(dtypes.Graphsync), modules.Graphsync(graphsyncThrottle)), )) ens.InterconnectAll().BeginMining(blockTime) dh := kit.NewDealHarness(t, client, miner, miner) @@ -159,7 +159,7 @@ func TestSimultanenousTransferLimit(t *testing.T) { select { case u := <-du: t.Logf("%d - %s", u.TransferID, datatransfer.Statuses[u.Status]) - if u.Status == datatransfer.Ongoing { + if u.Status == datatransfer.Ongoing && u.Transferred > 0 { ongoing[u.TransferID] = struct{}{} } else { delete(ongoing, u.TransferID)