Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: test: flaky TestDeadlineToggling around nulls #9354

Merged
merged 1 commit into from
Sep 21, 2022
Merged

Conversation

arajasek
Copy link
Contributor

Related Issues

Fixes #7809

Okay, here's the flaky failure that motivated this: https://app.circleci.com/pipelines/github/filecoin-project/lotus/23151/workflows/058fcc2a-e606-4407-93f6-5050b6b8ab32/jobs/587417.

A miner has just terminated all their sectors. We expect them to have power 0, but still have Cron active -- cron should deactivated upon the next deadline close. The test asserts that cron should be active (true) unless the tipset that executes the TerminateSectors message (one after the tipset that includes the message) is exactly equal to a deadline.Open, in which case the test asserts that cron should be inactive.

BUT, if the TerminateSectors message is included at height X, and the deadline opens at height X+1, BUT X+1 was null, then this doesn't work! The tipset that executed the TerminateSectors message is height X+2, it DOES run the cron that flips cron for this miner to inactive, but its height is NOT exactly equal to deadline.Open (it's one greater).

Proposed Changes

Make it di.Open <= ts.Height().

Additional Info

Checklist

Before you mark the PR ready for review, please make sure that:

  • All commits have a clear commit message.
  • The PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, INTERFACE BREAKING CHANGE, CONSENSUS BREAKING, build, chore, ci, docs,perf, refactor, revert, style, test
    • area: api, chain, state, vm, data transfer, market, mempool, message, block production, multisig, networking, paychan, proving, sealing, wallet, deps
  • This PR has tests for new functionality or change in behaviour
  • If new user-facing features are introduced, clear usage guidelines and / or documentation updates should be included in https://lotus.filecoin.io or Discussion Tutorials.
  • CI is green

@arajasek arajasek requested a review from a team as a code owner September 21, 2022 20:58
Copy link
Contributor

@geoff-vball geoff-vball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change can't make it any worse 🤷

@arajasek arajasek enabled auto-merge (squash) September 21, 2022 21:11
@arajasek arajasek merged commit 7a2bc47 into master Sep 21, 2022
@arajasek arajasek deleted the asr/deflake branch September 21, 2022 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TestDeadlineToggling is flaky
2 participants