Fix confusing and incorrect test condition#571
Merged
nothingmuch merged 2 commits intopayjoin:masterfrom Mar 12, 2025
Merged
Conversation
When a v2 receiver polls expecting a 200 or 202 status response, that status code is associated with the OHTTP encapsulated response, and is therefore handled in the process_res method and detected implicitly via the empty body branch. The response status for OHTTP gateway requests will always be 200 regardless of what the internal request's status is.
Collaborator
Pull Request Test Coverage Report for Build 13818601223Details
💛 - Coveralls |
DanGould
approved these changes
Mar 12, 2025
Contributor
DanGould
left a comment
There was a problem hiding this comment.
Great catch. This must have been written before process_res handled OHTTP properly and been missed somehow.
ACK 1bef64b
Curious about the delay between response processing and request, but the curiosity doesn't necessarily need to be addressed or otherwise block progress.
DanGould
approved these changes
Mar 12, 2025
Contributor
DanGould
left a comment
There was a problem hiding this comment.
ACK 0f7b9e5
@nothingmuch did you re-read the original PR description?
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.
The v1_to_v2 test checks the v2 receiver's polling behavior, and the directory's backwards compatible handling of that.
However, as the following diff demonstrates when applied, it's actually the first request, the one which receives a 503 response whose data makes it to the receiver, and the 202 status check in the test never triggers even when that initial sender's proposal is withheld to force the directory to respond with 202, instead triggering
.expect("proposal should exist"):