lotus/itests/deals_test.go

36 lines
913 B
Go
Raw Normal View History

2021-06-10 12:25:36 +00:00
package itests
import (
"testing"
"time"
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()
var blockTime = 50 * time.Millisecond
2021-06-18 18:45:29 +00:00
client, miner, ens := kit.EnsembleMinimal(t, kit.ThroughRPC()) // no mock proofs.
ens.InterconnectAll().BeginMining(blockTime)
2021-06-18 18:45:29 +00:00
dh := kit.NewDealHarness(t, client, miner)
t.Run("stdretrieval", func(t *testing.T) {
2021-06-23 17:13:29 +00:00
dh.RunConcurrentDeals(kit.RunConcurrentDealsOpts{N: 1})
})
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
})
}