Skip to content

tests: fix TestP2PEnableGossipService_BothDisable#6320

Merged
algorandskiy merged 1 commit intoalgorand:masterfrom
algorandskiy:pavel/p2p-fix-both-dis-test
May 9, 2025
Merged

tests: fix TestP2PEnableGossipService_BothDisable#6320
algorandskiy merged 1 commit intoalgorand:masterfrom
algorandskiy:pavel/p2p-fix-both-dis-test

Conversation

@algorandskiy
Copy link
Copy Markdown
Contributor

@algorandskiy algorandskiy commented May 9, 2025

Summary

After merging #6308 the TestP2PEnableGossipService_BothDisable test became unstable because of a race condition between the check in the test and closing connection in CloseWithoutFlush.
Fixed by manually subscribing to Connected notification to make sure connections were made but still no peers due to EnableGossipService=false option.

Test Plan

This is a test fix

@codecov
Copy link
Copy Markdown

codecov bot commented May 9, 2025

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 51.85%. Comparing base (48e45d0) to head (17f3f59).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
network/p2p/p2p.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6320      +/-   ##
==========================================
- Coverage   51.86%   51.85%   -0.02%     
==========================================
  Files         652      652              
  Lines       87437    87442       +5     
==========================================
- Hits        45350    45339      -11     
- Misses      39222    39239      +17     
+ Partials     2865     2864       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@algorandskiy algorandskiy merged commit f13575c into algorand:master May 9, 2025
21 checks passed
cce pushed a commit to cce/go-algorand that referenced this pull request May 29, 2025
@algorandskiy algorandskiy deleted the pavel/p2p-fix-both-dis-test branch March 16, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants