Skip to content

chore(go): enable race detector in tests#4622

Merged
erikgb merged 1 commit intoweaveworks:mainfrom
erikgb:enable-go-test-race-detect
Jan 26, 2025
Merged

chore(go): enable race detector in tests#4622
erikgb merged 1 commit intoweaveworks:mainfrom
erikgb:enable-go-test-race-detect

Conversation

@erikgb
Copy link
Copy Markdown
Contributor

@erikgb erikgb commented Jan 26, 2025

Closes

What changed?

  • Enable Go race detector for Go testing (which requires CGO_ENABLED=1)
  • Fix a race detected by the detector when running tests.

Why was this change made?

I am trying to figure out why the Go tests sometimes blocks "forever" in CI. Example: https://github.com/weaveworks/weave-gitops/actions/runs/12973902776/job/36183126193. And I have a feeling this problem is related to Goroutines, missing error handling and/or races. I want to eliminate the latter, so I suggest we enable the race detector for the tests.

How was this change implemented?

How did you validate the change?

Release notes

Documentation Changes

@erikgb erikgb requested a review from a team January 26, 2025 13:40
@erikgb erikgb merged commit 3899dcb into weaveworks:main Jan 26, 2025
This was referenced Feb 4, 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.

2 participants