Skip to content

Conversation

@dannykopping
Copy link
Contributor

@dannykopping dannykopping commented Dec 5, 2025

Closes coder/internal#1173
Closes coder/internal#1174

Currently these two tests are flaky because the contexts were created before a potentially long-running process. By the time the context was actually used, it may have timed out - leading to confusion.

Additionally, the ExpectMatch calls were not using the test context - but rather a background context. I've marked that func as deprecated because we should always tie these to the test context.

Special thanks to @mafredri for the brain probe 🧠

Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
}

// Deprecated: use ExpectMatchContext instead.
// This uses a background context, so will not respect the test's context.
Copy link
Member

Choose a reason for hiding this comment

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

❤️

@dannykopping dannykopping enabled auto-merge (squash) December 5, 2025 13:05
@dannykopping dannykopping merged commit 259dee2 into main Dec 5, 2025
34 checks passed
@dannykopping dannykopping deleted the dk/evil-contexts branch December 5, 2025 13:14
@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flake: TestSSH_Container/OK flake: TestExpRpty/Container

3 participants