add a test to demonstrate SDR upgrade while committing sectors

This commit is contained in:
Steven Allen
2020-11-16 19:04:17 +01:00
committed by Łukasz Magiera
parent 869867e92e
commit d8afd71f4c
3 changed files with 114 additions and 23 deletions
+16
View File
@@ -93,6 +93,22 @@ func TestDealMining(t *testing.T) {
test.TestDealMining(t, builder.MockSbBuilder, 50*time.Millisecond, false)
}
func TestSDRUpgrade(t *testing.T) {
logging.SetLogLevel("miner", "ERROR")
logging.SetLogLevel("chainstore", "ERROR")
logging.SetLogLevel("chain", "ERROR")
logging.SetLogLevel("sub", "ERROR")
logging.SetLogLevel("storageminer", "ERROR")
oldDelay := policy.GetPreCommitChallengeDelay()
policy.SetPreCommitChallengeDelay(5)
t.Cleanup(func() {
policy.SetPreCommitChallengeDelay(oldDelay)
})
test.TestSDRUpgrade(t, builder.MockSbBuilder, 50*time.Millisecond)
}
func TestPledgeSectors(t *testing.T) {
logging.SetLogLevel("miner", "ERROR")
logging.SetLogLevel("chainstore", "ERROR")