Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all(test): prefer t.Context where possible #573

Merged
merged 1 commit into from
Feb 15, 2025
Merged

all(test): prefer t.Context where possible #573

merged 1 commit into from
Feb 15, 2025

Conversation

abhinav
Copy link
Owner

@abhinav abhinav commented Feb 15, 2025

t.Context was added in Go 1.24 to provide a context
that is valid only for the lifetime of a test function.

This change updates test functions to use this context where possible.

Cases where it can't be used:

  • rapid tests
  • t.Cleanup functions

@abhinav
Copy link
Owner Author

abhinav commented Feb 15, 2025

This change is part of the following stack:

Change managed by git-spice.

t.Context was added in Go 1.24 to provide a context
that is valid only for the lifetime of a test function.

This change updates test functions to use this context where possible.

Cases where it can't be used:

- rapid tests
- t.Cleanup functions
@abhinav abhinav added the skip changelog PRs that don't need a changelog. label Feb 15, 2025
@abhinav abhinav marked this pull request as ready for review February 15, 2025 22:06
@abhinav abhinav enabled auto-merge (squash) February 15, 2025 22:06
@abhinav abhinav merged commit 04c3f63 into main Feb 15, 2025
12 of 13 checks passed
@abhinav abhinav deleted the t-context branch February 15, 2025 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changelog PRs that don't need a changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant