10000 refactor(server): do not leak cache in tests by krzema12 · Pull Request #1933 · typesafegithub/github-workflows-kt · GitHub
[go: up one dir, main page]

Skip to content

refactor(server): do not leak cache in tests #1933

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

Merged
merged 1 commit into from
May 1, 2025

Conversation

krzema12
Copy link
Member
@krzema12 krzema12 commented May 1, 2025

Thanks to this, the test aren't aware of an implementation detail of the server: the cache.
We wrap the whole server config in an appModule, and inject a piece of logic exposed by maven-binding-builder Gradle module. This piece is the only thing we need to mock right now in the test. It makes the test less brittle and couple with the implementation (although some necessary coupling is still there).

@krzema12 krzema12 merged commit 496f20c into main May 1, 2025
16 checks passed
@krzema12 krzema12 deleted the do-not-leak-cache-in-tests branch May 1, 2025 09:17
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.

1 participant
0