Skip to content

Add tests to observe HTTP/1.1 connection closures #423

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

Merged
merged 1 commit into from
Sep 13, 2021

Conversation

fabianfett
Copy link
Member

Motivation

There are a number of tests in HTTPClientInternalTest that are hard to reproduce after the refactor. The current implementation has a number of (internal) properties that will be removed with the refactor. For example there is a way to access the underlying channel from a request today. We don't want to expose those things in a new implementation. But we want to test at least the same things. For this reason I added some tests around sudden HTTP/1.1 connection closures that we want to use going forward.

Changes

  • Moved MockConnectionDelegate to HTTP1ConnectionTests.swift, where it is actually used.
  • Added tests around sudden connection closures

Result

Easier test after the implementation has been switched over.

@fabianfett fabianfett requested a review from Lukasa September 13, 2021 13:41
@fabianfett fabianfett merged commit ed58449 into swift-server:main Sep 13, 2021
@fabianfett fabianfett deleted the ff-add-further-http1-tests branch September 13, 2021 14:05
@fabianfett fabianfett added the semver/none No version bump required. label Sep 13, 2021
@fabianfett fabianfett added this to the HTTP/2 support milestone Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/none No version bump required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants