This repository has been archived by the owner on Apr 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
[WAIT] Issue 14: Add Request to ResponsePredicate #36
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
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.
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.
Hmm, this isn't quite right, I think. The actual requests that resulted in the responses
resps
are not necessarilyreq
. Rather, they are the requests generated by theRequestPredicate
s based onreq
.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.
I have to think a little more about this. It feels like it's becoming evident that the
Request
/ResponsePredicate
distinction is somewhat artificial or misleading. Really what's at stake is something like the distinction between request generator (or generator modifiers) and (request + response) predicates. But separating those two too much is also wrong, since usually one wants to generate certain requests in order to check the responses.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.
I am glad to have your perspective on this. I was wondering about the difference between
ResponsePredicate
andRequestPredicate
when I was working on this PR, but I figured the distinction is still valid as aRequestPredicate
needs aManager
in order to actually issue requests.I have to confess I didn't look closely enough at
finishPredicates
, so it's a relief that you caught my mistake, which I can see clearly now.I agree with what you're saying that checking a particular response is really often about a
(Request, Response)
pair. I was kind of errantly thinking about bifunctors or profunctors when looking at this code this weekend, but I didn't follow the thought very far.