You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
make aws-smithy-mocks interceptor multi-concurrent (#4469)
the current interceptor is single-threaded in that it only stores the
last mocked response and returns it in the interceptor chain when
appropriate. this doesn't work in multi-concurrent scenarios where you
want to create and then return multiple (potentially different)
responses in parallel. this change improves upon that so that the
interceptor returns the mocked response pertaining to the appropriate
request at the appropriate time.
## Motivation and Context
Allows for the `aws-smithy-mocks` tooling to be used in multi-concurrent
or multi-threaded scenarios
## Testing
I have application testing that relies on this functionality, but
couldn't find a way to satisfactorily test this within
`aws-smithy-mocks` itself. I think the problem is that the test
operation tooling used by most of the tests is serial, which makes it
hard if not impossible to exercise the race condition. Maybe I'm missing
something easy here.
## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [x] For changes to the smithy-rs codegen or runtime crates, I have
created a changelog entry Markdown file in the `.changelog` directory,
specifying "client," "server," or both in the `applies_to` key.
- [ ] For changes to the AWS SDK, generated SDK code, or SDK runtime
crates, I have created a changelog entry Markdown file in the
`.changelog` directory, specifying "aws-sdk-rust" in the `applies_to`
key.
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
---------
Co-authored-by: Aaron Todd <aajtodd@users.noreply.github.com>
0 commit comments