Skip to content
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

Remove unnecessary indirection in HTTP unit tests #10555

Merged
merged 11 commits into from Apr 15, 2016

Conversation

jdm
Copy link
Member

@jdm jdm commented Apr 12, 2016

Many of the HTTP unit tests use a custom request factory as well as a custom request that contained test logic. This is unnecessarily convoluted, and exists solely because the complete set of headers was unavailable until the request body was sent. These patches restructure the header manipulations so that the headers are available when the request object is created, allowing the test logic to move into the test factories, and enabling the deletion of almost all of the test request types.


This change is Reviewable

@highfive
Copy link

Heads up! This PR modifies the following files:

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Apr 12, 2016
@Ms2ger
Copy link
Contributor

Ms2ger commented Apr 13, 2016

Reviewed 2 of 2 files at r1, 1 of 1 files at r2, 1 of 1 files at r3, 1 of 1 files at r4, 1 of 1 files at r5, 1 of 1 files at r6, 1 of 1 files at r7, 1 of 1 files at r8, 2 of 2 files at r9, 2 of 2 files at r10.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


components/net/http_loader.rs, line 249 [r2] (raw file):
Nit: _s should be in this commit


Comments from Reviewable

@Ms2ger Ms2ger assigned Ms2ger and unassigned wafflespeanut Apr 13, 2016
@Ms2ger Ms2ger added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Apr 13, 2016
@bors-servo
Copy link
Contributor

☔ The latest upstream changes (presumably #10587) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Apr 14, 2016
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Apr 15, 2016
@jdm
Copy link
Member Author

jdm commented Apr 15, 2016

@bors-servo: r=ms2ger

@bors-servo
Copy link
Contributor

📌 Commit 43369fa has been approved by ms2ger

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. S-needs-rebase There are merge conflict errors. labels Apr 15, 2016
@bors-servo
Copy link
Contributor

⌛ Testing commit 43369fa with merge eb78e21...

bors-servo pushed a commit that referenced this pull request Apr 15, 2016
Remove unnecessary indirection in HTTP unit tests

Many of the HTTP unit tests use a custom request factory as well as a custom request that contained test logic. This is unnecessarily convoluted, and exists solely because the complete set of headers was unavailable until the request body was sent. These patches restructure the header manipulations so that the headers are available when the request object is created, allowing the test logic to move into the test factories, and enabling the deletion of almost all of the test request types.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10555)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt

@bors-servo bors-servo merged commit 43369fa into servo:master Apr 15, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Apr 15, 2016
@Ms2ger Ms2ger deleted the http_response_refactor branch April 15, 2016 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants