Skip to content

Conversation

@conomist
Copy link
Contributor

Context: Heimdall version monitor tests were using context.TODO(), risking leaked goroutines.
Change: Switch tests to context.WithCancel and attach cancellation via t.Cleanup, passing the derived context into NewVersionMonitor.
Outcome: Tests clean up spawned goroutines deterministically; no behavior change to assertions.

)

func TestVersioMonitorHeimdallV2(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go now has t.Context()

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