-
Notifications
You must be signed in to change notification settings - Fork 7.2k
remove get_responses_requests and get_responses_request_bodies to use in-place matcher
#8858
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
Conversation
|
@codex fix it |
|
Summary
Testing
|
724c87e to
564930b
Compare
|
@codex review this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 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".
codex-rs/core/tests/suite/compact.rs
Outdated
| let requests: Vec<_> = request_log | ||
| .iter() | ||
| .flat_map(ResponseMock::requests) | ||
| .collect(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.