From 51aecb6b172a43ee44321f20cc1b9aed11d2af4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 20 Feb 2023 17:38:18 +0100 Subject: [PATCH] fix: tests: Make TestWorkerKeyChange not flaky --- cmd/lotus-miner/actor_test.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/cmd/lotus-miner/actor_test.go b/cmd/lotus-miner/actor_test.go index 791298ffa..dfb452213 100644 --- a/cmd/lotus-miner/actor_test.go +++ b/cmd/lotus-miner/actor_test.go @@ -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) @@ -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)) }