remove get_responses_requests and get_responses_request_bodies to use in-place matcher#8858
remove get_responses_requests and get_responses_request_bodies to use in-place matcher#8858aibrahim-oai merged 13 commits intomainfrom
get_responses_requests and get_responses_request_bodies to use in-place matcher#8858Conversation
|
@codex fix it |
|
Summary
Testing
|
724c87e to
564930b
Compare
|
@codex review this |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 995ccfffa4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let requests: Vec<_> = request_log | ||
| .iter() | ||
| .flat_map(ResponseMock::requests) | ||
| .collect(); |
There was a problem hiding this comment.
Avoid flattening per-mock ResponseMock logs
In this test you flatten ResponseMock::requests() from four mount_sse_once_match mocks, but base_mock inserts the ResponseMock matcher before the custom matcher and wiremock evaluates matchers in order (MockBuilder::and appends; MountedMock::matches uses all). That means each mock records every POST to /responses even when its custom matcher fails, so with multiple mocks you’ll see duplicates (and ordering grouped by mock), making the request_bodies.len()/index assertions wrong or flaky. Consider logging via a single mock (e.g., mount_sse_sequence), or ensure the logging matcher runs last so only actual matches are captured.
Useful? React with 👍 / 👎.
|
@codex fix this |
|
Summary
Testing
|
No description provided.