Skip to content

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.

@fabianfettfabianfett merged commit ed58449 into swift-server:mainSep 13, 2021
@fabianfettfabianfett deleted the ff-add-further-http1-tests branch September 13, 2021 14:05
@fabianfettfabianfett added the semver/none No version bump required. label Sep 13, 2021
@fabianfettfabianfett added this to the HTTP/2 support milestone Sep 13, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver/noneNo version bump required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@fabianfett@Lukasa