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

fix flaky testContentLengthTooLongFails test #269

Merged
merged 1 commit into from
Jun 22, 2020

Conversation

artemredkin
Copy link
Collaborator

Fixes flaky test

Motivation:
Test was actually getting 404 and was closing connection too early.

Modifications:
Fix request path.

Result:
Closes #265

@@ -2319,7 +2319,7 @@ class HTTPClientTests: XCTestCase {
}

func testContentLengthTooLongFails() throws {
let url = self.defaultHTTPBinURLPrefix + "/post"
let url = self.defaultHTTPBinURLPrefix + "post"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in httpbin:

URLComponents(string: "//post")!.percentEncodedPath -> ""

Copy link
Contributor

@weissi weissi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops :)

@weissi weissi merged commit c097c17 into swift-server:master Jun 22, 2020
@artemredkin artemredkin deleted the fix_flaky_test branch June 22, 2020 14:43
@artemredkin
Copy link
Collaborator Author

I almost pulled all my hair out trying to figure out why the channel is closed :)

artemredkin added a commit to artemredkin/async-http-client that referenced this pull request Jun 23, 2020
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.

flaky test HTTPClientTests.testContentLengthTooLongFails
2 participants