Skip to content

Commit

Permalink
Merge pull request #6141 from filecoin-project/split-TestBatchDealInp…
Browse files Browse the repository at this point in the history
…ut-from-TestAPIDealFlow

flaky tests improvement: separate TestBatchDealInput from TestAPIDealFlow
  • Loading branch information
magik6k authored Apr 29, 2021
2 parents 84d7565 + c7d74ef commit 9b87566
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions node/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,23 @@ func TestAPIDealFlow(t *testing.T) {
t.Run("TestPublishDealsBatching", func(t *testing.T) {
test.TestPublishDealsBatching(t, builder.MockSbBuilder, blockTime, dealStartEpoch)
})
t.Run("TestBatchDealInput", func(t *testing.T) {
test.TestBatchDealInput(t, builder.MockSbBuilder, blockTime, dealStartEpoch)
})
}

func TestBatchDealInput(t *testing.T) {
logging.SetLogLevel("miner", "ERROR")
logging.SetLogLevel("chainstore", "ERROR")
logging.SetLogLevel("chain", "ERROR")
logging.SetLogLevel("sub", "ERROR")
logging.SetLogLevel("storageminer", "ERROR")

blockTime := 10 * time.Millisecond

// For these tests where the block time is artificially short, just use
// a deal start epoch that is guaranteed to be far enough in the future
// so that the deal starts sealing in time
dealStartEpoch := abi.ChainEpoch(2 << 12)

test.TestBatchDealInput(t, builder.MockSbBuilder, blockTime, dealStartEpoch)
}

func TestAPIDealFlowReal(t *testing.T) {
Expand Down

0 comments on commit 9b87566

Please sign in to comment.