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

test(node): fix TestNetworkVerificationOnNonEmptyDB #2562

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Exca-DK
Copy link
Contributor

@Exca-DK Exca-DK commented Feb 25, 2025

Fixes #2495

It seems the issue arises because the timeout is set to 250 milliseconds, which makes the test somewhat racy. This test checks whether the stored blocks are compatible with the provided flag. If no block is received within 250 milliseconds, no error occurs because the state remains empty.

The proposed fix in PR #2494 appears hacky, as it simply increases the window time. I believe increasing the context timeout would be a more appropriate solution in this case.

That said, I wasn't able to reproduce the described error unless I explicitly introduced a delay using time.Sleep() here.

Copy link

codecov bot commented Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.55%. Comparing base (7239e37) to head (9a79739).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2562      +/-   ##
==========================================
- Coverage   73.57%   73.55%   -0.03%     
==========================================
  Files         137      137              
  Lines       16662    16662              
==========================================
- Hits        12259    12255       -4     
- Misses       3537     3542       +5     
+ Partials      866      865       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@weiihann weiihann requested a review from AnkushinDaniil March 10, 2025 08:13
@weiihann weiihann changed the title Fix flaky node test test(node): fix TestNetworkVerificationOnNonEmptyDB Mar 10, 2025
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.

TestNetworkVerificationOnNonEmptyDB issue
1 participant