lotus/itests/deals_test.go

48 lines
1.3 KiB
Go
Raw Normal View History

2021-06-10 12:25:36 +00:00
package itests
import (
"testing"
"time"
"github.com/filecoin-project/lotus/chain/actors/policy"
2021-06-18 18:45:29 +00:00
"github.com/filecoin-project/lotus/itests/kit"
2021-06-10 12:25:36 +00:00
)
func TestDealsWithSealingAndRPC(t *testing.T) {
if testing.Short() {
t.Skip("skipping test in short mode")
}
2021-06-18 18:45:29 +00:00
kit.QuietMiningLogs()
oldDelay := policy.GetPreCommitChallengeDelay()
policy.SetPreCommitChallengeDelay(5)
t.Cleanup(func() {
policy.SetPreCommitChallengeDelay(oldDelay)
})
var blockTime = 50 * time.Millisecond
2021-06-22 10:05:59 +00:00
client, miner, ens := kit.EnsembleMinimal(t, kit.ThroughRPC(), kit.WithAllSubsystems()) // no mock proofs.
ens.InterconnectAll().BeginMining(blockTime)
dh := kit.NewDealHarness(t, client, miner, miner)
t.Run("stdretrieval", func(t *testing.T) {
2021-06-23 17:13:29 +00:00
dh.RunConcurrentDeals(kit.RunConcurrentDealsOpts{N: 1})
2021-06-23 09:56:09 +00:00
})
t.Run("fastretrieval", func(t *testing.T) {
2021-06-23 17:13:29 +00:00
dh.RunConcurrentDeals(kit.RunConcurrentDealsOpts{N: 1, FastRetrieval: true})
})
t.Run("fastretrieval-twodeals-sequential", func(t *testing.T) {
2021-06-23 17:13:29 +00:00
dh.RunConcurrentDeals(kit.RunConcurrentDealsOpts{N: 1, FastRetrieval: true})
dh.RunConcurrentDeals(kit.RunConcurrentDealsOpts{N: 1, FastRetrieval: true})
2021-06-13 22:43:22 +00:00
})
2021-07-15 12:20:35 +00:00
t.Run("stdretrieval-carv1", func(t *testing.T) {
dh.RunConcurrentDeals(kit.RunConcurrentDealsOpts{N: 1, UseCARFileForStorageDeal: true})
})
2021-06-13 22:43:22 +00:00
}