Merged
Conversation
This comment has been minimized.
This comment has been minimized.
added 3 commits
August 8, 2022 15:51
the services based on tower-test were isolated in a task, which means that any panic due to mockall would stay in that task and not affect the rest of the tests. This rewrites the mock service system to provide clonable mock services that can panic
bnjjj
approved these changes
Aug 12, 2022
Contributor
o0Ignition0o
left a comment
There was a problem hiding this comment.
LGTM overall,
The only thing i m not comfortable with is the need for our plugin devs to call .expect_clone().
I think I'd even rather implement copy to our mocks to avoid having to do that.
WDYT is there a way we can get rid of this call?
Contributor
Author
|
it's not nice but AFAIK there is no way to just clone the expectations. And we can have different requirements depending on which instance of the service is called. I'd be open to a fix for that, but not in this PR: here I mainly want to have tests that work as expected |
Merged
goto-bus-stop
added a commit
that referenced
this pull request
Jan 27, 2025
…vice_closed` test This appears to test an intended-enough behaviour. Originally introduced: #918 Comment outdated as of: #1440 This is a behaviour change compared to #1440, but the intended behaviour from #918. What's a bit worrying is that this depends on the internal composition of our pipeline, but is externally observable?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #1435
Note:
this does not fix this issue yet, because the service is isolated in a task, so any panic generated by mockall will stay in the task:it is fixed now:router/apollo-router/src/plugin/test/service.rs
Lines 26 to 35 in b55a628