Skip to content

Fix data race in unit tests#78

Merged
oskarszoon merged 3 commits into
bsv-blockchain:mainfrom
oskarszoon:bugfix/fix-data-races
Oct 30, 2025
Merged

Fix data race in unit tests#78
oskarszoon merged 3 commits into
bsv-blockchain:mainfrom
oskarszoon:bugfix/fix-data-races

Conversation

@oskarszoon

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

github-actions Bot commented Oct 30, 2025

Copy link
Copy Markdown
Contributor

🤖 Claude Code Review

Status: Complete

Current Review:
No issues found. This PR properly fixes data races in unit tests by:

  • Adding context lifecycle management (context.WithCancel() + defer cancel()) to all test functions that create BlockValidation instances, ensuring spawned goroutines are cleaned up
  • Sorting test package execution order in Makefile for deterministic test runs
  • Adding missing encoding/binary import in p2p tests

The changes follow Go best practices and directly address the goroutine leak issues identified in the referenced commits.

@sonarqubecloud

Copy link
Copy Markdown

@oskarszoon oskarszoon self-assigned this Oct 30, 2025
@oskarszoon oskarszoon merged commit 9f134e5 into bsv-blockchain:main Oct 30, 2025
8 checks passed
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.

2 participants