Skip to content

Commit

Permalink
test: eth: deflake multiblock lookup test (#10769)
Browse files Browse the repository at this point in the history
- Increase epoch times to give the miners a chance to see each other's
blocks.
- Wait longer for a multi-block tipset.
- Reduce the initial wait (we're increasing the block times and I don't
really feel like waiting around).
  • Loading branch information
Stebalien authored Apr 26, 2023
1 parent d2c3e84 commit e351d77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions itests/eth_block_hash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,22 @@ import (
func TestEthBlockHashesCorrect_MultiBlockTipset(t *testing.T) {
// miner is connected to the first node, and we want to observe the chain
// from the second node.
blocktime := 100 * time.Millisecond
blocktime := 250 * time.Millisecond
n1, m1, m2, ens := kit.EnsembleOneTwo(t,
kit.MockProofs(),
kit.ThroughRPC(),
)
ens.InterconnectAll().BeginMining(blocktime)

ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
n1.WaitTillChain(ctx, kit.HeightAtLeast(abi.ChainEpoch(25)))
n1.WaitTillChain(ctx, kit.HeightAtLeast(abi.ChainEpoch(5)))
defer cancel()

var n2 kit.TestFullNode
ens.FullNode(&n2, kit.ThroughRPC()).Start().Connect(n2, n1)

// find the first tipset where all miners mined a block.
ctx, cancel = context.WithTimeout(context.Background(), 1*time.Minute)
ctx, cancel = context.WithTimeout(context.Background(), 5*time.Minute)
n2.WaitTillChain(ctx, kit.BlocksMinedByAll(m1.ActorAddr, m2.ActorAddr))
defer cancel()

Expand Down

0 comments on commit e351d77

Please sign in to comment.