Revert "test: (kinda) fix flaky test"

This reverts commit baee4a1576.
This commit is contained in:
Nikola Divic 2022-02-12 17:10:00 +01:00
parent baee4a1576
commit d50a26f4ae
2 changed files with 2 additions and 24 deletions

View File

@ -95,11 +95,12 @@ func TestDealsRetryLackOfFunds(t *testing.T) {
dp.FastRetrieval = true
dp.EpochPrice = abi.NewTokenAmount(62500000) // minimum asking price.
deal := dh.StartDeal(ctx, dp)
dh.WaitUntilDataTransfer(ctx, deal)
propcid := *deal
go func() {
time.Sleep(3 * time.Second)
kit.SendFunds(ctx, t, minerFullNode, publishStorageDealKey.Address, types.FromFil(1))
err := miner.MarketRetryPublishDeal(ctx, propcid)

View File

@ -134,29 +134,6 @@ func (dh *DealHarness) StartDeal(ctx context.Context, dealParams api.StartDealPa
return dealProposalCid
}
func (dh *DealHarness) WaitUntilDataTransfer(ctx context.Context, deal *cid.Cid) {
loop:
for {
di, err := dh.client.ClientGetDealInfo(ctx, *deal)
if err != nil {
dh.t.Fatal("can't fetch deal info")
}
switch di.State {
case storagemarket.StorageDealProposalRejected:
dh.t.Fatal("deal rejected")
case storagemarket.StorageDealFailing:
dh.t.Fatal("deal failed")
case storagemarket.StorageDealError:
dh.t.Fatal("deal errored")
case storagemarket.StorageDealStartDataTransfer:
break loop
}
time.Sleep(time.Millisecond * 100)
}
}
// WaitDealSealed waits until the deal is sealed.
func (dh *DealHarness) WaitDealSealed(ctx context.Context, deal *cid.Cid, noseal, noSealStart bool, cb func()) {
loop: