Skip to content

tests: fix TestP2PRelay data race#6316

Merged
gmalouf merged 2 commits intoalgorand:masterfrom
algorandskiy:pavel/network-p2p-test-data-race
May 7, 2025
Merged

tests: fix TestP2PRelay data race#6316
gmalouf merged 2 commits intoalgorand:masterfrom
algorandskiy:pavel/network-p2p-test-data-race

Conversation

@algorandskiy
Copy link
Copy Markdown
Contributor

Summary

Fix for the following data race:

==================
WARNING: DATA RACE
Read at 0x00c0005202b8 by goroutine 737:
  github.com/algorand/go-algorand/network.TestP2PRelay.TestP2PRelay.func3.func7()
      /home/runner/work/go-algorand/go-algorand/network/p2pNetwork_test.go:907 +0xb4
  github.com/algorand/go-algorand/network.ValidateHandleFunc.ValidateHandle()
      /home/runner/work/go-algorand/go-algorand/network/gossipNode.go:237 +0x121
  go:struct { github.com/algorand/go-algorand/network.ValidateHandleFunc }.ValidateHandle()
      <autogenerated>:1 +0x2a

Previous write at 0x00c0005202b8 by goroutine 731:
  github.com/algorand/go-algorand/network.TestP2PRelay.TestP2PRelay.func3.func7()
      /home/runner/work/go-algorand/go-algorand/network/p2pNetwork_test.go:907 +0x16b
  github.com/algorand/go-algorand/network.ValidateHandleFunc.ValidateHandle()
      /home/runner/work/go-algorand/go-algorand/network/gossipNode.go:237 +0x121
  go:struct { github.com/algorand/go-algorand/network.ValidateHandleFunc }.ValidateHandle()
      <autogenerated>:1 +0x2a

Test Plan

Existing tests

jannotti
jannotti previously approved these changes May 7, 2025
@algorandskiy
Copy link
Copy Markdown
Contributor Author

Fixed the linter

@algorandskiy algorandskiy requested a review from jannotti May 7, 2025 16:34
@codecov
Copy link
Copy Markdown

codecov bot commented May 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.83%. Comparing base (8521387) to head (871611e).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6316      +/-   ##
==========================================
- Coverage   51.84%   51.83%   -0.02%     
==========================================
  Files         652      652              
  Lines       87433    87433              
==========================================
- Hits        45333    45320      -13     
- Misses      39233    39244      +11     
- Partials     2867     2869       +2     

☔ 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 requested a review from cce May 7, 2025 17:43
@gmalouf gmalouf merged commit 005bf7e into algorand:master May 7, 2025
19 checks passed
cce pushed a commit to cce/go-algorand that referenced this pull request May 29, 2025
@algorandskiy algorandskiy deleted the pavel/network-p2p-test-data-race branch March 16, 2026 20:05
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