Skip to content

Commit

Permalink
fix: tests: Make TestWorkerKeyChange not flaky
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k committed Feb 20, 2023
1 parent 3841e54 commit 51aecb6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions cmd/lotus-miner/actor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ func TestWorkerKeyChange(t *testing.T) {

kit.QuietMiningLogs()

blocktime := 1 * time.Millisecond
client1, client2, miner, ens := kit.EnsembleTwoOne(t, kit.MockProofs())
blocktime := 5 * time.Millisecond
client1, miner, ens := kit.EnsembleMinimal(t, kit.MockProofs())
ens.InterconnectAll().BeginMining(blocktime)

output := bytes.NewBuffer(nil)
Expand Down Expand Up @@ -96,7 +96,4 @@ func TestWorkerKeyChange(t *testing.T) {
// Wait for finality (worker key switch).
targetHeight := head.Height() + policy.ChainFinality
client1.WaitTillChain(ctx, kit.HeightAtLeast(targetHeight))

// Make sure the other node can catch up.
client2.WaitTillChain(ctx, kit.HeightAtLeast(targetHeight))
}

0 comments on commit 51aecb6

Please sign in to comment.