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

refactor(context): refactor context handling and improve test robustness #4081

Closed
wants to merge 1 commit into from

Conversation

appleboy
Copy link
Member

@appleboy appleboy commented Oct 25, 2024

  • Use assert.InDelta for float comparison with tolerance in TestContextGetFloat32
  • Remove unnecessary blank line in TestContextInitQueryCache
  • Replace anonymous struct with named contextKey type in TestContextWithFallbackValueFromRequestContext
  • Update context key handling in TestContextWithFallbackValueFromRequestContext to use contextKey type

@thinkerou Please help to review.

- Use `assert.InDelta` for float comparison with tolerance in `TestContextGetFloat32`
- Remove unnecessary blank line in `TestContextInitQueryCache`
- Replace anonymous struct with named `contextKey` type in `TestContextWithFallbackValueFromRequestContext`
- Update context key handling in `TestContextWithFallbackValueFromRequestContext` to use `contextKey` type

Signed-off-by: appleboy <[email protected]>
@appleboy
Copy link
Member Author

duplicated #4066

@appleboy appleboy closed this Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant