Skip to content

Commit

Permalink
Merge pull request #6804 from filecoin-project/fix/flaky-window-post-…
Browse files Browse the repository at this point in the history
…test

test: fix flaky window post tests
  • Loading branch information
Stebalien authored Jul 21, 2021
2 parents c1f0ebb + 38919f5 commit 2919547
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion itests/wdpost_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,18 @@ func TestWindowPostBaseFeeNoBurn(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

sched := kit.DefaultTestUpgradeSchedule
lastUpgradeHeight := sched[len(sched)-1].Height

och := build.UpgradeClausHeight
build.UpgradeClausHeight = 10
build.UpgradeClausHeight = lastUpgradeHeight + 1

client, miner, ens := kit.EnsembleMinimal(t, kit.MockProofs())
ens.InterconnectAll().BeginMining(blocktime)

// Wait till all upgrades are done and we've passed the clause epoch.
client.WaitTillChain(ctx, kit.HeightAtLeast(build.UpgradeClausHeight+1))

maddr, err := miner.ActorAddress(ctx)
require.NoError(t, err)

Expand Down Expand Up @@ -268,6 +274,12 @@ func TestWindowPostBaseFeeBurn(t *testing.T) {
client, miner, ens := kit.EnsembleMinimal(t, kit.MockProofs(), opts)
ens.InterconnectAll().BeginMining(blocktime)

// Ideally we'd be a bit more precise here, but getting the information we need from the
// test framework is more work than it's worth.
//
// We just need to wait till all upgrades are done.
client.WaitTillChain(ctx, kit.HeightAtLeast(20))

maddr, err := miner.ActorAddress(ctx)
require.NoError(t, err)

Expand Down

0 comments on commit 2919547

Please sign in to comment.