Deflake empty-block in mempool test#3137
Merged
Merged
Conversation
TestMempoolProgressAfterCreateEmptyBlocksInterval used the same 5s value for CreateEmptyBlocksInterval and for the helper that requires the next event to arrive before timing out. After spending one full ensureTimeout asserting that no early block was produced, the test only gave the next empty block another ensureTimeout to be proposed, committed and published. On slower CI runners that boundary is tight enough for the helper to fire before the NewBlock event is delivered, even though consensus behavior is correct. Fix that test by waiting for the exact next NewBlock height with the existing eventual helper. The test still asserts that no block is created during the full empty-block interval, and it now additionally checks that the next block is exactly the expected height.
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
bdchatham
approved these changes
Mar 30, 2026
pompon0
approved these changes
Mar 30, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3137 +/- ##
=======================================
Coverage 58.73% 58.74%
=======================================
Files 2095 2095
Lines 173517 173517
=======================================
+ Hits 101920 101928 +8
+ Misses 62481 62476 -5
+ Partials 9116 9113 -3
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TestMempoolProgressAfterCreateEmptyBlocksInterval used the same 5s value for CreateEmptyBlocksInterval and for the helper that requires the next event to arrive before timing out. After spending one full ensureTimeout asserting that no early block was produced, the test only gave the next empty block another ensureTimeout to be proposed, committed and published. On slower CI runners that boundary is tight enough for the helper to fire before the NewBlock event is delivered, even though consensus behavior is correct.
Fix that test by waiting for the exact next NewBlock height with the existing eventual helper. The test still asserts that no block is created during the full empty-block interval, and it now additionally checks that the next block is exactly the expected height.
Flaked in unrelated changes.