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

[1.0] Fix production_restart test flakiness #674

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

linh2931
Copy link
Member

The test requires pending policy to be in place. It waits on LIB. But a proposed policy is promoted to pending only after the block where it was proposed becomes final; that LIB is not necessarily the LIB where the policy was proposed.

In the test failure reported by #672, it was LIB on the block before setfinalizer because the setfinalizer was sent to the node that was not producing at the time. On the producer the setfinalizer is in the next block.

The solution is wait until the block where a finalizer policy was proposed becomes final before checking pending policy.

Resolves #672

@heifner heifner linked an issue Aug 30, 2024 that may be closed by this pull request
# A proposed finalizer policy is promoted to pending only after the block where it
# was proposed become irreversible.
# Wait for pending policy is in place.
assert node0.waitForTransFinalization(transId), f'setfinalizer transaction {transId} failed to be rolled into a LIB block'
Copy link
Contributor

Choose a reason for hiding this comment

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

waitForTransFinalization seems like an odd name to me? Isn't it just waitForBlockFinal?

Copy link
Member Author

Choose a reason for hiding this comment

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

The function takes a transaction ID as a parameter. The name seems ok.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, makes sense, thanks!

@linh2931 linh2931 merged commit f38ae6b into release/1.0 Aug 30, 2024
36 checks passed
@linh2931 linh2931 deleted the fix_prod_restart_test_flakeness branch August 30, 2024 17:19
@ericpassmore
Copy link
Contributor

Note:start
group: STABILITY
category: TEST
summary: Upgrade test to resolve race condition where test results were checked after policy change was applied.
Note:end

@ericpassmore ericpassmore added the test-instability tag issues for flaky tests, high priority to address label Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test-instability tag issues for flaky tests, high priority to address
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test failure: production_restart
4 participants