test(core): select the create_bug request by method and path - #112
Merged
Conversation
client_create_bug_posts_the_payload_to_rest_bug parsed reqs[0].body, assuming the first recorded request was its POST. wiremock 0.6.5 records bodies atomically under the same lock as matching, so a partial body is impossible - but the process-wide server pool keeps listener ports for the process lifetime, and the freed-port I12 tests in this binary fire bodyless GETs at recycled ephemeral ports, so a foreign GET can land first on another test's server. That yields exactly the reported EOF-at-column-0 panic, reproduced deterministically by injecting one such GET. The test now selects the sole recorded POST /rest/bug and asserts a non-empty body before parsing, so a future failure names what actually went wrong. Closes #93
This was referenced Aug 18, 2026
Closed
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.
Closes #93. Root cause established against wiremock 0.6.5 source and reproduced: bodies record atomically under the match lock (partial body impossible — the issue's assumption 2 cannot happen); the real mechanism is the process-wide wiremock server pool keeping listener ports for the process lifetime while freed-port I12 tests fire bodyless GETs at recycled ephemeral ports — a foreign GET recorded on another test's server, caught in the act under stress by both implementer and reviewer independently. Deterministic repro of the byte-identical EOF panic fails pre-fix, passes post-fix; seven mutations prove the selector and diagnostics. Known follow-up (issue to come): this fixes the one body-parsing victim; the binary-wide freed-port hazard (3 sibling tests, ~1%/run under load, worst case silently skipping I12 sanitization) needs its own change. Adversarially reviewed (APPROVE).