diff --git a/Package@swift-5.5.swift b/Package@swift-5.5.swift deleted file mode 100644 index 0ad7d1f3b..000000000 --- a/Package@swift-5.5.swift +++ /dev/null @@ -1,75 +0,0 @@ -// swift-tools-version:5.5 -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// - -import PackageDescription - -let package = Package( - name: "async-http-client", - products: [ - .library(name: "AsyncHTTPClient", targets: ["AsyncHTTPClient"]), - ], - dependencies: [ - .package(url: "https://github.com/apple/swift-nio.git", from: "2.50.0"), - .package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.22.0"), - .package(url: "https://github.com/apple/swift-nio-http2.git", from: "1.19.0"), - .package(url: "https://github.com/apple/swift-nio-extras.git", from: "1.13.0"), - .package(url: "https://github.com/apple/swift-nio-transport-services.git", from: "1.11.4"), - .package(url: "https://github.com/apple/swift-log.git", from: "1.4.4"), - .package(url: "https://github.com/apple/swift-atomics.git", from: "1.0.2"), - ], - targets: [ - .target(name: "CAsyncHTTPClient"), - .target( - name: "AsyncHTTPClient", - dependencies: [ - .target(name: "CAsyncHTTPClient"), - .product(name: "NIO", package: "swift-nio"), - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOPosix", package: "swift-nio"), - .product(name: "NIOHTTP1", package: "swift-nio"), - .product(name: "NIOConcurrencyHelpers", package: "swift-nio"), - .product(name: "NIOHTTP2", package: "swift-nio-http2"), - .product(name: "NIOSSL", package: "swift-nio-ssl"), - .product(name: "NIOHTTPCompression", package: "swift-nio-extras"), - .product(name: "NIOSOCKS", package: "swift-nio-extras"), - .product(name: "NIOTransportServices", package: "swift-nio-transport-services"), - .product(name: "Logging", package: "swift-log"), - .product(name: "Atomics", package: "swift-atomics"), - ] - ), - .testTarget( - name: "AsyncHTTPClientTests", - dependencies: [ - .target(name: "AsyncHTTPClient"), - .product(name: "NIOCore", package: "swift-nio"), - .product(name: "NIOConcurrencyHelpers", package: "swift-nio"), - .product(name: "NIOEmbedded", package: "swift-nio"), - .product(name: "NIOFoundationCompat", package: "swift-nio"), - .product(name: "NIOTestUtils", package: "swift-nio"), - .product(name: "NIOSSL", package: "swift-nio-ssl"), - .product(name: "NIOHTTP2", package: "swift-nio-http2"), - .product(name: "NIOSOCKS", package: "swift-nio-extras"), - .product(name: "Logging", package: "swift-log"), - .product(name: "Atomics", package: "swift-atomics"), - ], - resources: [ - .copy("Resources/self_signed_cert.pem"), - .copy("Resources/self_signed_key.pem"), - .copy("Resources/example.com.cert.pem"), - .copy("Resources/example.com.private-key.pem"), - ] - ), - ] -) diff --git a/README.md b/README.md index 27354d8da..e969c54ff 100644 --- a/README.md +++ b/README.md @@ -323,11 +323,12 @@ Please have a look at [SECURITY.md](SECURITY.md) for AsyncHTTPClient's security ## Supported Versions -The most recent versions of AsyncHTTPClient support Swift 5.5.2 and newer. The minimum Swift version supported by AsyncHTTPClient releases are detailed below: +The most recent versions of AsyncHTTPClient support Swift 5.6 and newer. The minimum Swift version supported by AsyncHTTPClient releases are detailed below: AsyncHTTPClient | Minimum Swift Version --------------------|---------------------- `1.0.0 ..< 1.5.0` | 5.0 `1.5.0 ..< 1.10.0` | 5.2 `1.10.0 ..< 1.13.0` | 5.4 -`1.13.0 ...` | 5.5.2 +`1.13.0 ..< 1.18.0` | 5.5.2 +`1.18.0 ...` | 5.6 diff --git a/Sources/AsyncHTTPClient/AsyncAwait/HTTPClientRequest.swift b/Sources/AsyncHTTPClient/AsyncAwait/HTTPClientRequest.swift index 6f3637f77..278be7f84 100644 --- a/Sources/AsyncHTTPClient/AsyncAwait/HTTPClientRequest.swift +++ b/Sources/AsyncHTTPClient/AsyncAwait/HTTPClientRequest.swift @@ -91,7 +91,6 @@ extension HTTPClientRequest.Body { self.init(.byteBuffer(byteBuffer)) } - #if swift(>=5.6) /// Create an ``HTTPClientRequest/Body-swift.struct`` from a `RandomAccessCollection` of bytes. /// /// This construction will flatten the bytes into a `ByteBuffer`. As a result, the peak memory @@ -106,21 +105,6 @@ extension HTTPClientRequest.Body { ) -> Self where Bytes.Element == UInt8 { Self._bytes(bytes) } - #else - /// Create an ``HTTPClientRequest/Body-swift.struct`` from a `RandomAccessCollection` of bytes. - /// - /// This construction will flatten the bytes into a `ByteBuffer`. As a result, the peak memory - /// usage of this construction will be double the size of the original collection. The construction - /// of the `ByteBuffer` will be delayed until it's needed. - /// - /// - parameter bytes: The bytes of the request body. - @inlinable - public static func bytes( - _ bytes: Bytes - ) -> Self where Bytes.Element == UInt8 { - Self._bytes(bytes) - } - #endif @inlinable static func _bytes( @@ -139,7 +123,6 @@ extension HTTPClientRequest.Body { }) } - #if swift(>=5.6) /// Create an ``HTTPClientRequest/Body-swift.struct`` from a `Sequence` of bytes. /// /// This construction will flatten the bytes into a `ByteBuffer`. As a result, the peak memory @@ -165,32 +148,6 @@ extension HTTPClientRequest.Body { ) -> Self where Bytes.Element == UInt8 { Self._bytes(bytes, length: length) } - #else - /// Create an ``HTTPClientRequest/Body-swift.struct`` from a `Sequence` of bytes. - /// - /// This construction will flatten the bytes into a `ByteBuffer`. As a result, the peak memory - /// usage of this construction will be double the size of the original collection. The construction - /// of the `ByteBuffer` will be delayed until it's needed. - /// - /// Unlike ``bytes(_:)-1uns7``, this construction does not assume that the body can be replayed. As a result, - /// if a redirect is encountered that would need us to replay the request body, the redirect will instead - /// not be followed. Prefer ``bytes(_:)-1uns7`` wherever possible. - /// - /// Caution should be taken with this method to ensure that the `length` is correct. Incorrect lengths - /// will cause unnecessary runtime failures. Setting `length` to ``Length/unknown`` will trigger the upload - /// to use `chunked` `Transfer-Encoding`, while using ``Length/known(_:)`` will use `Content-Length`. - /// - /// - parameters: - /// - bytes: The bytes of the request body. - /// - length: The length of the request body. - @inlinable - public static func bytes( - _ bytes: Bytes, - length: Length - ) -> Self where Bytes.Element == UInt8 { - Self._bytes(bytes, length: length) - } - #endif @inlinable static func _bytes( @@ -210,7 +167,6 @@ extension HTTPClientRequest.Body { }) } - #if swift(>=5.6) /// Create an ``HTTPClientRequest/Body-swift.struct`` from a `Collection` of bytes. /// /// This construction will flatten the bytes into a `ByteBuffer`. As a result, the peak memory @@ -232,28 +188,6 @@ extension HTTPClientRequest.Body { ) -> Self where Bytes.Element == UInt8 { Self._bytes(bytes, length: length) } - #else - /// Create an ``HTTPClientRequest/Body-swift.struct`` from a `Collection` of bytes. - /// - /// This construction will flatten the bytes into a `ByteBuffer`. As a result, the peak memory - /// usage of this construction will be double the size of the original collection. The construction - /// of the `ByteBuffer` will be delayed until it's needed. - /// - /// Caution should be taken with this method to ensure that the `length` is correct. Incorrect lengths - /// will cause unnecessary runtime failures. Setting `length` to ``Length/unknown`` will trigger the upload - /// to use `chunked` `Transfer-Encoding`, while using ``Length/known(_:)`` will use `Content-Length`. - /// - /// - parameters: - /// - bytes: The bytes of the request body. - /// - length: The length of the request body. - @inlinable - public static func bytes( - _ bytes: Bytes, - length: Length - ) -> Self where Bytes.Element == UInt8 { - Self._bytes(bytes, length: length) - } - #endif @inlinable static func _bytes( @@ -273,7 +207,6 @@ extension HTTPClientRequest.Body { }) } - #if swift(>=5.6) /// Create an ``HTTPClientRequest/Body-swift.struct`` from an `AsyncSequence` of `ByteBuffer`s. /// /// This construction will stream the upload one `ByteBuffer` at a time. @@ -293,26 +226,6 @@ extension HTTPClientRequest.Body { ) -> Self where SequenceOfBytes.Element == ByteBuffer { Self._stream(sequenceOfBytes, length: length) } - #else - /// Create an ``HTTPClientRequest/Body-swift.struct`` from an `AsyncSequence` of `ByteBuffer`s. - /// - /// This construction will stream the upload one `ByteBuffer` at a time. - /// - /// Caution should be taken with this method to ensure that the `length` is correct. Incorrect lengths - /// will cause unnecessary runtime failures. Setting `length` to ``Length/unknown`` will trigger the upload - /// to use `chunked` `Transfer-Encoding`, while using ``Length/known(_:)`` will use `Content-Length`. - /// - /// - parameters: - /// - sequenceOfBytes: The bytes of the request body. - /// - length: The length of the request body. - @inlinable - public static func stream( - _ sequenceOfBytes: SequenceOfBytes, - length: Length - ) -> Self where SequenceOfBytes.Element == ByteBuffer { - Self._stream(sequenceOfBytes, length: length) - } - #endif @inlinable static func _stream( @@ -328,7 +241,6 @@ extension HTTPClientRequest.Body { return body } - #if swift(>=5.6) /// Create an ``HTTPClientRequest/Body-swift.struct`` from an `AsyncSequence` of bytes. /// /// This construction will consume 1kB chunks from the `Bytes` and send them at once. This optimizes for @@ -350,28 +262,6 @@ extension HTTPClientRequest.Body { ) -> Self where Bytes.Element == UInt8 { Self._stream(bytes, length: length) } - #else - /// Create an ``HTTPClientRequest/Body-swift.struct`` from an `AsyncSequence` of bytes. - /// - /// This construction will consume 1kB chunks from the `Bytes` and send them at once. This optimizes for - /// `AsyncSequence`s where larger chunks are buffered up and available without actually suspending, such - /// as those provided by `FileHandle`. - /// - /// Caution should be taken with this method to ensure that the `length` is correct. Incorrect lengths - /// will cause unnecessary runtime failures. Setting `length` to ``Length/unknown`` will trigger the upload - /// to use `chunked` `Transfer-Encoding`, while using ``Length/known(_:)`` will use `Content-Length`. - /// - /// - parameters: - /// - bytes: The bytes of the request body. - /// - length: The length of the request body. - @inlinable - public static func stream( - _ bytes: Bytes, - length: Length - ) -> Self where Bytes.Element == UInt8 { - Self._stream(bytes, length: length) - } - #endif @inlinable static func _stream( diff --git a/Sources/AsyncHTTPClient/ConnectionPool/HTTP1/HTTP1ClientChannelHandler.swift b/Sources/AsyncHTTPClient/ConnectionPool/HTTP1/HTTP1ClientChannelHandler.swift index 8af70ac23..63cb70b99 100644 --- a/Sources/AsyncHTTPClient/ConnectionPool/HTTP1/HTTP1ClientChannelHandler.swift +++ b/Sources/AsyncHTTPClient/ConnectionPool/HTTP1/HTTP1ClientChannelHandler.swift @@ -433,10 +433,8 @@ final class HTTP1ClientChannelHandler: ChannelDuplexHandler { } } -#if swift(>=5.6) @available(*, unavailable) extension HTTP1ClientChannelHandler: Sendable {} -#endif extension HTTP1ClientChannelHandler: HTTPRequestExecutor { func writeRequestBodyPart(_ data: IOData, request: HTTPExecutableRequest, promise: EventLoopPromise?) { diff --git a/Sources/AsyncHTTPClient/Docs.docc/index.md b/Sources/AsyncHTTPClient/Docs.docc/index.md index 3a05778ce..66a9d1135 100644 --- a/Sources/AsyncHTTPClient/Docs.docc/index.md +++ b/Sources/AsyncHTTPClient/Docs.docc/index.md @@ -13,12 +13,6 @@ This library provides the following: - Automatic HTTP/2 over HTTPS (since version 1.7.0) - Cookie parsing (but not storage) ---- - -**NOTE**: You will need [Xcode 13.2](https://apps.apple.com/gb/app/xcode/id497799835?mt=12) or [Swift 5.5.2](https://swift.org/download/#swift-552) to try out `AsyncHTTPClient`s new async/await APIs. - ---- - ### Getting Started #### Adding the dependency diff --git a/Sources/AsyncHTTPClient/HTTPClient.swift b/Sources/AsyncHTTPClient/HTTPClient.swift index a916d3ade..de6b57087 100644 --- a/Sources/AsyncHTTPClient/HTTPClient.swift +++ b/Sources/AsyncHTTPClient/HTTPClient.swift @@ -200,7 +200,6 @@ public class HTTPClient { } } - #if swift(>=5.6) /// Shuts down the client and event loop gracefully. /// /// This function is clearly an outlier in that it uses a completion @@ -213,17 +212,6 @@ public class HTTPClient { ) { self.shutdown(requiresCleanClose: false, queue: queue, callback) } - #else - /// Shuts down the client and event loop gracefully. - /// - /// This function is clearly an outlier in that it uses a completion - /// callback instead of an EventLoopFuture. The reason for that is that NIO's EventLoopFutures will call back on an event loop. - /// The virtue of this function is to shut the event loop down. To work around that we call back on a DispatchQueue - /// instead. - public func shutdown(queue: DispatchQueue = .global(), _ callback: @escaping (Error?) -> Void) { - self.shutdown(requiresCleanClose: false, queue: queue, callback) - } - #endif /// Shuts down the ``HTTPClient`` and releases its resources. /// @@ -917,11 +905,7 @@ public class HTTPClient { case enabled(limit: NIOHTTPDecompression.DecompressionLimit) } - #if swift(>=5.6) typealias ShutdownCallback = @Sendable (Error?) -> Void - #else - typealias ShutdownCallback = (Error?) -> Void - #endif enum State { case upAndRunning @@ -934,10 +918,8 @@ public class HTTPClient { extension HTTPClient.Configuration: Sendable {} #endif -#if swift(>=5.6) extension HTTPClient.EventLoopGroupProvider: Sendable {} extension HTTPClient.EventLoopPreference: Sendable {} -#endif // HTTPClient is thread-safe because its shared mutable state is protected through a lock extension HTTPClient: @unchecked Sendable {} diff --git a/Sources/AsyncHTTPClient/HTTPHandler.swift b/Sources/AsyncHTTPClient/HTTPHandler.swift index 0c84ef6bc..c5a3b3a4a 100644 --- a/Sources/AsyncHTTPClient/HTTPHandler.swift +++ b/Sources/AsyncHTTPClient/HTTPHandler.swift @@ -49,16 +49,11 @@ extension HTTPClient { /// Body size. If nil,`Transfer-Encoding` will automatically be set to `chunked`. Otherwise a `Content-Length` /// header is set with the given `length`. public var length: Int? - #if swift(>=5.6) + /// Body chunk provider. public var stream: @Sendable (StreamWriter) -> EventLoopFuture @usableFromInline typealias StreamCallback = @Sendable (StreamWriter) -> EventLoopFuture - #else - public var stream: (StreamWriter) -> EventLoopFuture - - @usableFromInline typealias StreamCallback = (StreamWriter) -> EventLoopFuture - #endif @inlinable init(length: Int?, stream: @escaping StreamCallback) { @@ -76,7 +71,6 @@ extension HTTPClient { } } - #if swift(>=5.6) /// Create and stream body using ``StreamWriter``. /// /// - parameters: @@ -87,19 +81,7 @@ extension HTTPClient { public static func stream(length: Int? = nil, _ stream: @Sendable @escaping (StreamWriter) -> EventLoopFuture) -> Body { return Body(length: length, stream: stream) } - #else - /// Create and stream body using ``StreamWriter``. - /// - /// - parameters: - /// - length: Body size. If nil, `Transfer-Encoding` will automatically be set to `chunked`. Otherwise a `Content-Length` - /// header is set with the given `length`. - /// - stream: Body chunk provider. - public static func stream(length: Int? = nil, _ stream: @escaping (StreamWriter) -> EventLoopFuture) -> Body { - return Body(length: length, stream: stream) - } - #endif - #if swift(>=5.6) /// Create and stream body using a collection of bytes. /// /// - parameters: @@ -111,18 +93,6 @@ extension HTTPClient { writer.write(.byteBuffer(ByteBuffer(bytes: bytes))) } } - #else - /// Create and stream body using a collection of bytes. - /// - /// - parameters: - /// - data: Body binary representation. - @inlinable - public static func bytes(_ bytes: Bytes) -> Body where Bytes: RandomAccessCollection, Bytes.Element == UInt8 { - return Body(length: bytes.count) { writer in - writer.write(.byteBuffer(ByteBuffer(bytes: bytes))) - } - } - #endif /// Create and stream body using `String`. /// diff --git a/Sources/AsyncHTTPClient/Utils.swift b/Sources/AsyncHTTPClient/Utils.swift index 3bbb97904..f8618ea17 100644 --- a/Sources/AsyncHTTPClient/Utils.swift +++ b/Sources/AsyncHTTPClient/Utils.swift @@ -23,16 +23,10 @@ public final class HTTPClientCopyingDelegate: HTTPClientResponseDelegate { let chunkHandler: (ByteBuffer) -> EventLoopFuture - #if swift(>=5.6) @preconcurrency public init(chunkHandler: @Sendable @escaping (ByteBuffer) -> EventLoopFuture) { self.chunkHandler = chunkHandler } - #else - public init(chunkHandler: @escaping (ByteBuffer) -> EventLoopFuture) { - self.chunkHandler = chunkHandler - } - #endif public func didReceiveBodyPart(task: HTTPClient.Task, _ buffer: ByteBuffer) -> EventLoopFuture { return self.chunkHandler(buffer) diff --git a/Tests/AsyncHTTPClientTests/AsyncAwaitEndToEndTests+XCTest.swift b/Tests/AsyncHTTPClientTests/AsyncAwaitEndToEndTests+XCTest.swift deleted file mode 100644 index 3156a2a0d..000000000 --- a/Tests/AsyncHTTPClientTests/AsyncAwaitEndToEndTests+XCTest.swift +++ /dev/null @@ -1,58 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// AsyncAwaitEndToEndTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension AsyncAwaitEndToEndTests { - static var allTests: [(String, (AsyncAwaitEndToEndTests) -> () throws -> Void)] { - return [ - ("testSimpleGet", testSimpleGet), - ("testSimplePost", testSimplePost), - ("testPostWithByteBuffer", testPostWithByteBuffer), - ("testPostWithSequenceOfUInt8", testPostWithSequenceOfUInt8), - ("testPostWithCollectionOfUInt8", testPostWithCollectionOfUInt8), - ("testPostWithRandomAccessCollectionOfUInt8", testPostWithRandomAccessCollectionOfUInt8), - ("testPostWithAsyncSequenceOfByteBuffers", testPostWithAsyncSequenceOfByteBuffers), - ("testPostWithAsyncSequenceOfUInt8", testPostWithAsyncSequenceOfUInt8), - ("testPostWithFragmentedAsyncSequenceOfByteBuffers", testPostWithFragmentedAsyncSequenceOfByteBuffers), - ("testPostWithFragmentedAsyncSequenceOfLargeByteBuffers", testPostWithFragmentedAsyncSequenceOfLargeByteBuffers), - ("testCanceling", testCanceling), - ("testCancelingResponseBody", testCancelingResponseBody), - ("testDeadline", testDeadline), - ("testImmediateDeadline", testImmediateDeadline), - ("testConnectTimeout", testConnectTimeout), - ("testSelfSignedCertificateIsRejectedWithCorrectErrorIfRequestDeadlineIsExceeded", testSelfSignedCertificateIsRejectedWithCorrectErrorIfRequestDeadlineIsExceeded), - ("testDnsOverride", testDnsOverride), - ("testInvalidURL", testInvalidURL), - ("testRedirectChangesHostHeader", testRedirectChangesHostHeader), - ("testShutdown", testShutdown), - ("testCancelingBodyDoesNotCrash", testCancelingBodyDoesNotCrash), - ("testAsyncSequenceReuse", testAsyncSequenceReuse), - ("testRejectsInvalidCharactersInHeaderFieldNames_http1", testRejectsInvalidCharactersInHeaderFieldNames_http1), - ("testRejectsInvalidCharactersInHeaderFieldNames_http2", testRejectsInvalidCharactersInHeaderFieldNames_http2), - ("testRejectsInvalidCharactersInHeaderFieldValues_http1", testRejectsInvalidCharactersInHeaderFieldValues_http1), - ("testRejectsInvalidCharactersInHeaderFieldValues_http2", testRejectsInvalidCharactersInHeaderFieldValues_http2), - ("testUsingGetMethodInsteadOfWait", testUsingGetMethodInsteadOfWait), - ("testSimpleContentLengthErrorNoBody", testSimpleContentLengthErrorNoBody), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/ConnectionPoolSizeConfigValueIsRespectedTests+XCTest.swift b/Tests/AsyncHTTPClientTests/ConnectionPoolSizeConfigValueIsRespectedTests+XCTest.swift deleted file mode 100644 index f76fea3c4..000000000 --- a/Tests/AsyncHTTPClientTests/ConnectionPoolSizeConfigValueIsRespectedTests+XCTest.swift +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// ConnectionPoolSizeConfigValueIsRespectedTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension ConnectionPoolSizeConfigValueIsRespectedTests { - static var allTests: [(String, (ConnectionPoolSizeConfigValueIsRespectedTests) -> () throws -> Void)] { - return [ - ("testConnectionPoolSizeConfigValueIsRespected", testConnectionPoolSizeConfigValueIsRespected), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTP1ClientChannelHandlerTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTP1ClientChannelHandlerTests+XCTest.swift deleted file mode 100644 index 2502e6fb7..000000000 --- a/Tests/AsyncHTTPClientTests/HTTP1ClientChannelHandlerTests+XCTest.swift +++ /dev/null @@ -1,39 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTP1ClientChannelHandlerTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTP1ClientChannelHandlerTests { - static var allTests: [(String, (HTTP1ClientChannelHandlerTests) -> () throws -> Void)] { - return [ - ("testResponseBackpressure", testResponseBackpressure), - ("testWriteBackpressure", testWriteBackpressure), - ("testClientHandlerCancelsRequestIfWeWantToShutdown", testClientHandlerCancelsRequestIfWeWantToShutdown), - ("testIdleReadTimeout", testIdleReadTimeout), - ("testIdleReadTimeoutIsCanceledIfRequestIsCanceled", testIdleReadTimeoutIsCanceledIfRequestIsCanceled), - ("testFailHTTPRequestWithContentLengthBecauseOfChannelInactiveWaitingForDemand", testFailHTTPRequestWithContentLengthBecauseOfChannelInactiveWaitingForDemand), - ("testWriteHTTPHeadFails", testWriteHTTPHeadFails), - ("testHandlerClosesChannelIfLastActionIsSendEndAndItFails", testHandlerClosesChannelIfLastActionIsSendEndAndItFails), - ("testChannelBecomesNonWritableDuringHeaderWrite", testChannelBecomesNonWritableDuringHeaderWrite), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTP1ConnectionStateMachineTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTP1ConnectionStateMachineTests+XCTest.swift deleted file mode 100644 index 76a37936b..000000000 --- a/Tests/AsyncHTTPClientTests/HTTP1ConnectionStateMachineTests+XCTest.swift +++ /dev/null @@ -1,48 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTP1ConnectionStateMachineTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTP1ConnectionStateMachineTests { - static var allTests: [(String, (HTTP1ConnectionStateMachineTests) -> () throws -> Void)] { - return [ - ("testPOSTRequestWithWriteAndReadBackpressure", testPOSTRequestWithWriteAndReadBackpressure), - ("testResponseReadingWithBackpressure", testResponseReadingWithBackpressure), - ("testAConnectionCloseHeaderInTheRequestLeadsToConnectionCloseAfterRequest", testAConnectionCloseHeaderInTheRequestLeadsToConnectionCloseAfterRequest), - ("testAHTTP1_0ResponseWithoutKeepAliveHeaderLeadsToConnectionCloseAfterRequest", testAHTTP1_0ResponseWithoutKeepAliveHeaderLeadsToConnectionCloseAfterRequest), - ("testAHTTP1_0ResponseWithKeepAliveHeaderLeadsToConnectionBeingKeptAlive", testAHTTP1_0ResponseWithKeepAliveHeaderLeadsToConnectionBeingKeptAlive), - ("testAConnectionCloseHeaderInTheResponseLeadsToConnectionCloseAfterRequest", testAConnectionCloseHeaderInTheResponseLeadsToConnectionCloseAfterRequest), - ("testNIOTriggersChannelActiveTwice", testNIOTriggersChannelActiveTwice), - ("testIdleConnectionBecomesInactive", testIdleConnectionBecomesInactive), - ("testConnectionGoesAwayWhileInRequest", testConnectionGoesAwayWhileInRequest), - ("testRequestWasCancelledWhileUploadingData", testRequestWasCancelledWhileUploadingData), - ("testCancelRequestIsIgnoredWhenConnectionIsIdle", testCancelRequestIsIgnoredWhenConnectionIsIdle), - ("testReadsAreForwardedIfConnectionIsClosing", testReadsAreForwardedIfConnectionIsClosing), - ("testChannelReadsAreIgnoredIfConnectionIsClosing", testChannelReadsAreIgnoredIfConnectionIsClosing), - ("testRequestIsCancelledWhileWaitingForWritable", testRequestIsCancelledWhileWaitingForWritable), - ("testConnectionIsClosedIfErrorHappensWhileInRequest", testConnectionIsClosedIfErrorHappensWhileInRequest), - ("testConnectionIsClosedAfterSwitchingProtocols", testConnectionIsClosedAfterSwitchingProtocols), - ("testWeDontCrashAfterEarlyHintsAndConnectionClose", testWeDontCrashAfterEarlyHintsAndConnectionClose), - ("testWeDontCrashInRaceBetweenSchedulingNewRequestAndConnectionClose", testWeDontCrashInRaceBetweenSchedulingNewRequestAndConnectionClose), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTP1ConnectionTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTP1ConnectionTests+XCTest.swift deleted file mode 100644 index 95b3e5dac..000000000 --- a/Tests/AsyncHTTPClientTests/HTTP1ConnectionTests+XCTest.swift +++ /dev/null @@ -1,42 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTP1ConnectionTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTP1ConnectionTests { - static var allTests: [(String, (HTTP1ConnectionTests) -> () throws -> Void)] { - return [ - ("testCreateNewConnectionWithDecompression", testCreateNewConnectionWithDecompression), - ("testCreateNewConnectionWithoutDecompression", testCreateNewConnectionWithoutDecompression), - ("testCreateNewConnectionFailureClosedIO", testCreateNewConnectionFailureClosedIO), - ("testGETRequest", testGETRequest), - ("testConnectionClosesOnCloseHeader", testConnectionClosesOnCloseHeader), - ("testConnectionClosesOnRandomlyAppearingCloseHeader", testConnectionClosesOnRandomlyAppearingCloseHeader), - ("testConnectionClosesAfterTheRequestWithoutHavingSentAnCloseHeader", testConnectionClosesAfterTheRequestWithoutHavingSentAnCloseHeader), - ("testConnectionIsClosedAfterSwitchingProtocols", testConnectionIsClosedAfterSwitchingProtocols), - ("testConnectionDropAfterEarlyHints", testConnectionDropAfterEarlyHints), - ("testConnectionIsClosedIfResponseIsReceivedBeforeRequest", testConnectionIsClosedIfResponseIsReceivedBeforeRequest), - ("testDoubleHTTPResponseLine", testDoubleHTTPResponseLine), - ("testDownloadStreamingBackpressure", testDownloadStreamingBackpressure), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTP1ProxyConnectHandlerTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTP1ProxyConnectHandlerTests+XCTest.swift deleted file mode 100644 index 15c432037..000000000 --- a/Tests/AsyncHTTPClientTests/HTTP1ProxyConnectHandlerTests+XCTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTP1ProxyConnectHandlerTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTP1ProxyConnectHandlerTests { - static var allTests: [(String, (HTTP1ProxyConnectHandlerTests) -> () throws -> Void)] { - return [ - ("testProxyConnectWithoutAuthorizationSuccess", testProxyConnectWithoutAuthorizationSuccess), - ("testProxyConnectWithAuthorization", testProxyConnectWithAuthorization), - ("testProxyConnectWithoutAuthorizationFailure500", testProxyConnectWithoutAuthorizationFailure500), - ("testProxyConnectWithoutAuthorizationButAuthorizationNeeded", testProxyConnectWithoutAuthorizationButAuthorizationNeeded), - ("testProxyConnectReceivesBody", testProxyConnectReceivesBody), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTP2ClientRequestHandlerTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTP2ClientRequestHandlerTests+XCTest.swift deleted file mode 100644 index 221a63211..000000000 --- a/Tests/AsyncHTTPClientTests/HTTP2ClientRequestHandlerTests+XCTest.swift +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTP2ClientRequestHandlerTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTP2ClientRequestHandlerTests { - static var allTests: [(String, (HTTP2ClientRequestHandlerTests) -> () throws -> Void)] { - return [ - ("testResponseBackpressure", testResponseBackpressure), - ("testWriteBackpressure", testWriteBackpressure), - ("testIdleReadTimeout", testIdleReadTimeout), - ("testIdleReadTimeoutIsCanceledIfRequestIsCanceled", testIdleReadTimeoutIsCanceledIfRequestIsCanceled), - ("testWriteHTTPHeadFails", testWriteHTTPHeadFails), - ("testChannelBecomesNonWritableDuringHeaderWrite", testChannelBecomesNonWritableDuringHeaderWrite), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTP2ClientTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTP2ClientTests+XCTest.swift deleted file mode 100644 index 915791cdf..000000000 --- a/Tests/AsyncHTTPClientTests/HTTP2ClientTests+XCTest.swift +++ /dev/null @@ -1,43 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTP2ClientTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTP2ClientTests { - static var allTests: [(String, (HTTP2ClientTests) -> () throws -> Void)] { - return [ - ("testSimpleGet", testSimpleGet), - ("testStreamRequestBodyWithoutKnowledgeAboutLength", testStreamRequestBodyWithoutKnowledgeAboutLength), - ("testStreamRequestBodyWithFalseKnowledgeAboutLength", testStreamRequestBodyWithFalseKnowledgeAboutLength), - ("testConcurrentRequests", testConcurrentRequests), - ("testConcurrentRequestsFromDifferentThreads", testConcurrentRequestsFromDifferentThreads), - ("testConcurrentRequestsWorkWithRequiredEventLoop", testConcurrentRequestsWorkWithRequiredEventLoop), - ("testUncleanShutdownCancelsExecutingAndQueuedTasks", testUncleanShutdownCancelsExecutingAndQueuedTasks), - ("testCancelingRunningRequest", testCancelingRunningRequest), - ("testReadTimeout", testReadTimeout), - ("testH2CanHandleRequestsThatHaveAlreadyHitTheDeadline", testH2CanHandleRequestsThatHaveAlreadyHitTheDeadline), - ("testStressCancelingRunningRequestFromDifferentThreads", testStressCancelingRunningRequestFromDifferentThreads), - ("testPlatformConnectErrorIsForwardedOnTimeout", testPlatformConnectErrorIsForwardedOnTimeout), - ("testMassiveDownload", testMassiveDownload), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTP2ConnectionTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTP2ConnectionTests+XCTest.swift deleted file mode 100644 index f26ca7d38..000000000 --- a/Tests/AsyncHTTPClientTests/HTTP2ConnectionTests+XCTest.swift +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTP2ConnectionTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTP2ConnectionTests { - static var allTests: [(String, (HTTP2ConnectionTests) -> () throws -> Void)] { - return [ - ("testCreateNewConnectionFailureClosedIO", testCreateNewConnectionFailureClosedIO), - ("testConnectionToleratesShutdownEventsAfterAlreadyClosed", testConnectionToleratesShutdownEventsAfterAlreadyClosed), - ("testSimpleGetRequest", testSimpleGetRequest), - ("testEveryDoneRequestLeadsToAStreamAvailableCall", testEveryDoneRequestLeadsToAStreamAvailableCall), - ("testCancelAllRunningRequests", testCancelAllRunningRequests), - ("testChildStreamsAreRemovedFromTheOpenChannelListOnceTheRequestIsDone", testChildStreamsAreRemovedFromTheOpenChannelListOnceTheRequestIsDone), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTP2IdleHandlerTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTP2IdleHandlerTests+XCTest.swift deleted file mode 100644 index a69530597..000000000 --- a/Tests/AsyncHTTPClientTests/HTTP2IdleHandlerTests+XCTest.swift +++ /dev/null @@ -1,42 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTP2IdleHandlerTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTP2IdleHandlerTests { - static var allTests: [(String, (HTTP2IdleHandlerTests) -> () throws -> Void)] { - return [ - ("testReceiveSettingsWithMaxConcurrentStreamSetting", testReceiveSettingsWithMaxConcurrentStreamSetting), - ("testReceiveSettingsWithoutMaxConcurrentStreamSetting", testReceiveSettingsWithoutMaxConcurrentStreamSetting), - ("testEmptySettingsDontOverwriteMaxConcurrentStreamSetting", testEmptySettingsDontOverwriteMaxConcurrentStreamSetting), - ("testOverwriteMaxConcurrentStreamSetting", testOverwriteMaxConcurrentStreamSetting), - ("testGoAwayReceivedBeforeSettings", testGoAwayReceivedBeforeSettings), - ("testGoAwayReceivedAfterSettings", testGoAwayReceivedAfterSettings), - ("testCloseEventBeforeFirstSettings", testCloseEventBeforeFirstSettings), - ("testCloseEventWhileNoOpenStreams", testCloseEventWhileNoOpenStreams), - ("testCloseEventWhileThereAreOpenStreams", testCloseEventWhileThereAreOpenStreams), - ("testGoAwayWhileThereAreOpenStreams", testGoAwayWhileThereAreOpenStreams), - ("testReceiveSettingsAndGoAwayAfterClientSideClose", testReceiveSettingsAndGoAwayAfterClientSideClose), - ("testConnectionUseLimitTriggersGoAway", testConnectionUseLimitTriggersGoAway), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTPClient+SOCKSTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPClient+SOCKSTests+XCTest.swift deleted file mode 100644 index 40ef6e0ff..000000000 --- a/Tests/AsyncHTTPClientTests/HTTPClient+SOCKSTests+XCTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTPClient+SOCKSTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTPClientSOCKSTests { - static var allTests: [(String, (HTTPClientSOCKSTests) -> () throws -> Void)] { - return [ - ("testProxySOCKS", testProxySOCKS), - ("testProxySOCKSBogusAddress", testProxySOCKSBogusAddress), - ("testProxySOCKSFailureNoServer", testProxySOCKSFailureNoServer), - ("testProxySOCKSFailureInvalidServer", testProxySOCKSFailureInvalidServer), - ("testProxySOCKSMisbehavingServer", testProxySOCKSMisbehavingServer), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTPClientCookieTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPClientCookieTests+XCTest.swift deleted file mode 100644 index 7ecf54d4d..000000000 --- a/Tests/AsyncHTTPClientTests/HTTPClientCookieTests+XCTest.swift +++ /dev/null @@ -1,44 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTPClientCookieTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTPClientCookieTests { - static var allTests: [(String, (HTTPClientCookieTests) -> () throws -> Void)] { - return [ - ("testCookie", testCookie), - ("testEmptyValueCookie", testEmptyValueCookie), - ("testCookieDefaults", testCookieDefaults), - ("testCookieInit", testCookieInit), - ("testMalformedCookies", testMalformedCookies), - ("testExpires", testExpires), - ("testMaxAge", testMaxAge), - ("testDomain", testDomain), - ("testPath", testPath), - ("testSecure", testSecure), - ("testHttpOnly", testHttpOnly), - ("testCookieExpiresDateParsing", testCookieExpiresDateParsing), - ("testQuotedCookies", testQuotedCookies), - ("testCookieExpiresDateParsingWithNonEnglishLocale", testCookieExpiresDateParsingWithNonEnglishLocale), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTPClientInformationalResponsesTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPClientInformationalResponsesTests+XCTest.swift deleted file mode 100644 index 63d7f85e2..000000000 --- a/Tests/AsyncHTTPClientTests/HTTPClientInformationalResponsesTests+XCTest.swift +++ /dev/null @@ -1,32 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTPClientInformationalResponsesTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTPClientReproTests { - static var allTests: [(String, (HTTPClientReproTests) -> () throws -> Void)] { - return [ - ("testServerSends100ContinueFirst", testServerSends100ContinueFirst), - ("testServerSendsSwitchingProtocols", testServerSendsSwitchingProtocols), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTPClientInternalTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPClientInternalTests+XCTest.swift deleted file mode 100644 index 9114df259..000000000 --- a/Tests/AsyncHTTPClientTests/HTTPClientInternalTests+XCTest.swift +++ /dev/null @@ -1,42 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTPClientInternalTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTPClientInternalTests { - static var allTests: [(String, (HTTPClientInternalTests) -> () throws -> Void)] { - return [ - ("testProxyStreaming", testProxyStreaming), - ("testProxyStreamingFailure", testProxyStreamingFailure), - ("testRequestURITrailingSlash", testRequestURITrailingSlash), - ("testChannelAndDelegateOnDifferentEventLoops", testChannelAndDelegateOnDifferentEventLoops), - ("testResponseFutureIsOnCorrectEL", testResponseFutureIsOnCorrectEL), - ("testUncleanCloseThrows", testUncleanCloseThrows), - ("testUploadStreamingIsCalledOnTaskEL", testUploadStreamingIsCalledOnTaskEL), - ("testTaskPromiseBoundToEL", testTaskPromiseBoundToEL), - ("testConnectErrorCalloutOnCorrectEL", testConnectErrorCalloutOnCorrectEL), - ("testInternalRequestURI", testInternalRequestURI), - ("testHasSuffix", testHasSuffix), - ("testSharedThreadPoolIsIdenticalForAllDelegates", testSharedThreadPoolIsIdenticalForAllDelegates), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTPClientNIOTSTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPClientNIOTSTests+XCTest.swift deleted file mode 100644 index 77f4298ba..000000000 --- a/Tests/AsyncHTTPClientTests/HTTPClientNIOTSTests+XCTest.swift +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTPClientNIOTSTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTPClientNIOTSTests { - static var allTests: [(String, (HTTPClientNIOTSTests) -> () throws -> Void)] { - return [ - ("testCorrectEventLoopGroup", testCorrectEventLoopGroup), - ("testTLSFailError", testTLSFailError), - ("testConnectionFailsFastError", testConnectionFailsFastError), - ("testConnectionFailError", testConnectionFailError), - ("testTLSVersionError", testTLSVersionError), - ("testTrustRootCertificateLoadFail", testTrustRootCertificateLoadFail), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTPClientRequestTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPClientRequestTests+XCTest.swift deleted file mode 100644 index 30d93f7de..000000000 --- a/Tests/AsyncHTTPClientTests/HTTPClientRequestTests+XCTest.swift +++ /dev/null @@ -1,43 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTPClientRequestTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTPClientRequestTests { - static var allTests: [(String, (HTTPClientRequestTests) -> () throws -> Void)] { - return [ - ("testCustomHeadersAreRespected", testCustomHeadersAreRespected), - ("testUnixScheme", testUnixScheme), - ("testHTTPUnixScheme", testHTTPUnixScheme), - ("testHTTPSUnixScheme", testHTTPSUnixScheme), - ("testGetWithoutBody", testGetWithoutBody), - ("testPostWithoutBody", testPostWithoutBody), - ("testPostWithEmptyByteBuffer", testPostWithEmptyByteBuffer), - ("testPostWithByteBuffer", testPostWithByteBuffer), - ("testPostWithSequenceOfUnknownLength", testPostWithSequenceOfUnknownLength), - ("testPostWithSequenceWithFixedLength", testPostWithSequenceWithFixedLength), - ("testPostWithRandomAccessCollection", testPostWithRandomAccessCollection), - ("testPostWithAsyncSequenceOfUnknownLength", testPostWithAsyncSequenceOfUnknownLength), - ("testPostWithAsyncSequenceWithKnownLength", testPostWithAsyncSequenceWithKnownLength), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTPClientResponseTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPClientResponseTests+XCTest.swift deleted file mode 100644 index 0a1a7cab6..000000000 --- a/Tests/AsyncHTTPClientTests/HTTPClientResponseTests+XCTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTPClientResponseTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTPClientResponseTests { - static var allTests: [(String, (HTTPClientResponseTests) -> () throws -> Void)] { - return [ - ("testSimpleResponse", testSimpleResponse), - ("testSimpleResponseNotModified", testSimpleResponseNotModified), - ("testSimpleResponseHeadRequestMethod", testSimpleResponseHeadRequestMethod), - ("testResponseNoContentLengthHeader", testResponseNoContentLengthHeader), - ("testResponseInvalidInteger", testResponseInvalidInteger), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTPClientTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPClientTests+XCTest.swift deleted file mode 100644 index 8f292239e..000000000 --- a/Tests/AsyncHTTPClientTests/HTTPClientTests+XCTest.swift +++ /dev/null @@ -1,156 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTPClientTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTPClientTests { - static var allTests: [(String, (HTTPClientTests) -> () throws -> Void)] { - return [ - ("testRequestURI", testRequestURI), - ("testBadRequestURI", testBadRequestURI), - ("testSchemaCasing", testSchemaCasing), - ("testURLSocketPathInitializers", testURLSocketPathInitializers), - ("testBadUnixWithBaseURL", testBadUnixWithBaseURL), - ("testConvenienceExecuteMethods", testConvenienceExecuteMethods), - ("testConvenienceExecuteMethodsOverSocket", testConvenienceExecuteMethodsOverSocket), - ("testConvenienceExecuteMethodsOverSecureSocket", testConvenienceExecuteMethodsOverSecureSocket), - ("testGet", testGet), - ("testGetWithDifferentEventLoopBackpressure", testGetWithDifferentEventLoopBackpressure), - ("testPost", testPost), - ("testPostWithGenericBody", testPostWithGenericBody), - ("testPostWithFoundationDataBody", testPostWithFoundationDataBody), - ("testGetHttps", testGetHttps), - ("testGetHttpsWithIP", testGetHttpsWithIP), - ("testGetHTTPSWorksOnMTELGWithIP", testGetHTTPSWorksOnMTELGWithIP), - ("testGetHttpsWithIPv6", testGetHttpsWithIPv6), - ("testGetHTTPSWorksOnMTELGWithIPv6", testGetHTTPSWorksOnMTELGWithIPv6), - ("testPostHttps", testPostHttps), - ("testHttpRedirect", testHttpRedirect), - ("testHttpHostRedirect", testHttpHostRedirect), - ("testPercentEncoded", testPercentEncoded), - ("testPercentEncodedBackslash", testPercentEncodedBackslash), - ("testMultipleContentLengthHeaders", testMultipleContentLengthHeaders), - ("testStreaming", testStreaming), - ("testFileDownload", testFileDownload), - ("testFileDownloadError", testFileDownloadError), - ("testFileDownloadCustomError", testFileDownloadCustomError), - ("testRemoteClose", testRemoteClose), - ("testReadTimeout", testReadTimeout), - ("testConnectTimeout", testConnectTimeout), - ("testDeadline", testDeadline), - ("testCancel", testCancel), - ("testStressCancel", testStressCancel), - ("testHTTPClientAuthorization", testHTTPClientAuthorization), - ("testProxyPlaintext", testProxyPlaintext), - ("testProxyTLS", testProxyTLS), - ("testProxyPlaintextWithCorrectlyAuthorization", testProxyPlaintextWithCorrectlyAuthorization), - ("testProxyPlaintextWithIncorrectlyAuthorization", testProxyPlaintextWithIncorrectlyAuthorization), - ("testUploadStreaming", testUploadStreaming), - ("testEventLoopArgument", testEventLoopArgument), - ("testDecompression", testDecompression), - ("testDecompressionHTTP2", testDecompressionHTTP2), - ("testDecompressionLimit", testDecompressionLimit), - ("testLoopDetectionRedirectLimit", testLoopDetectionRedirectLimit), - ("testCountRedirectLimit", testCountRedirectLimit), - ("testRedirectToTheInitialURLDoesThrowOnFirstRedirect", testRedirectToTheInitialURLDoesThrowOnFirstRedirect), - ("testMultipleConcurrentRequests", testMultipleConcurrentRequests), - ("testWorksWith500Error", testWorksWith500Error), - ("testWorksWithHTTP10Response", testWorksWithHTTP10Response), - ("testWorksWhenServerClosesConnectionAfterReceivingRequest", testWorksWhenServerClosesConnectionAfterReceivingRequest), - ("testSubsequentRequestsWorkWithServerSendingConnectionClose", testSubsequentRequestsWorkWithServerSendingConnectionClose), - ("testSubsequentRequestsWorkWithServerAlternatingBetweenKeepAliveAndClose", testSubsequentRequestsWorkWithServerAlternatingBetweenKeepAliveAndClose), - ("testStressGetHttpsSSLError", testStressGetHttpsSSLError), - ("testSelfSignedCertificateIsRejectedWithCorrectError", testSelfSignedCertificateIsRejectedWithCorrectError), - ("testSelfSignedCertificateIsRejectedWithCorrectErrorIfRequestDeadlineIsExceeded", testSelfSignedCertificateIsRejectedWithCorrectErrorIfRequestDeadlineIsExceeded), - ("testFailingConnectionIsReleased", testFailingConnectionIsReleased), - ("testStressGetClose", testStressGetClose), - ("testManyConcurrentRequestsWork", testManyConcurrentRequestsWork), - ("testRepeatedRequestsWorkWhenServerAlwaysCloses", testRepeatedRequestsWorkWhenServerAlwaysCloses), - ("testShutdownBeforeTasksCompletion", testShutdownBeforeTasksCompletion), - ("testUncleanShutdownActuallyShutsDown", testUncleanShutdownActuallyShutsDown), - ("testUncleanShutdownCancelsTasks", testUncleanShutdownCancelsTasks), - ("testDoubleShutdown", testDoubleShutdown), - ("testTaskFailsWhenClientIsShutdown", testTaskFailsWhenClientIsShutdown), - ("testRaceNewRequestsVsShutdown", testRaceNewRequestsVsShutdown), - ("testVaryingLoopPreference", testVaryingLoopPreference), - ("testMakeSecondRequestDuringCancelledCallout", testMakeSecondRequestDuringCancelledCallout), - ("testMakeSecondRequestDuringSuccessCallout", testMakeSecondRequestDuringSuccessCallout), - ("testMakeSecondRequestWhilstFirstIsOngoing", testMakeSecondRequestWhilstFirstIsOngoing), - ("testUDSBasic", testUDSBasic), - ("testUDSSocketAndPath", testUDSSocketAndPath), - ("testHTTPPlusUNIX", testHTTPPlusUNIX), - ("testHTTPSPlusUNIX", testHTTPSPlusUNIX), - ("testUseExistingConnectionOnDifferentEL", testUseExistingConnectionOnDifferentEL), - ("testWeRecoverFromServerThatClosesTheConnectionOnUs", testWeRecoverFromServerThatClosesTheConnectionOnUs), - ("testPoolClosesIdleConnections", testPoolClosesIdleConnections), - ("testAvoidLeakingTLSHandshakeCompletionPromise", testAvoidLeakingTLSHandshakeCompletionPromise), - ("testAsyncShutdown", testAsyncShutdown), - ("testAsyncShutdownDefaultQueue", testAsyncShutdownDefaultQueue), - ("testValidationErrorsAreSurfaced", testValidationErrorsAreSurfaced), - ("testUploadsReallyStream", testUploadsReallyStream), - ("testUploadStreamingCallinToleratedFromOtsideEL", testUploadStreamingCallinToleratedFromOtsideEL), - ("testWeHandleUsSendingACloseHeaderCorrectly", testWeHandleUsSendingACloseHeaderCorrectly), - ("testWeHandleUsReceivingACloseHeaderCorrectly", testWeHandleUsReceivingACloseHeaderCorrectly), - ("testWeHandleUsSendingACloseHeaderAmongstOtherConnectionHeadersCorrectly", testWeHandleUsSendingACloseHeaderAmongstOtherConnectionHeadersCorrectly), - ("testWeHandleUsReceivingACloseHeaderAmongstOtherConnectionHeadersCorrectly", testWeHandleUsReceivingACloseHeaderAmongstOtherConnectionHeadersCorrectly), - ("testLoggingCorrectlyAttachesRequestInformationEvenAfterDuringRedirect", testLoggingCorrectlyAttachesRequestInformationEvenAfterDuringRedirect), - ("testLoggingCorrectlyAttachesRequestInformation", testLoggingCorrectlyAttachesRequestInformation), - ("testNothingIsLoggedAtInfoOrHigher", testNothingIsLoggedAtInfoOrHigher), - ("testAllMethodsLog", testAllMethodsLog), - ("testClosingIdleConnectionsInPoolLogsInTheBackground", testClosingIdleConnectionsInPoolLogsInTheBackground), - ("testUploadStreamingNoLength", testUploadStreamingNoLength), - ("testConnectErrorPropagatedToDelegate", testConnectErrorPropagatedToDelegate), - ("testDelegateCallinsTolerateRandomEL", testDelegateCallinsTolerateRandomEL), - ("testContentLengthTooLongFails", testContentLengthTooLongFails), - ("testContentLengthTooShortFails", testContentLengthTooShortFails), - ("testBodyUploadAfterEndFails", testBodyUploadAfterEndFails), - ("testDoubleError", testDoubleError), - ("testSSLHandshakeErrorPropagation", testSSLHandshakeErrorPropagation), - ("testSSLHandshakeErrorPropagationDelayedClose", testSSLHandshakeErrorPropagationDelayedClose), - ("testWeCloseConnectionsWhenConnectionCloseSetByServer", testWeCloseConnectionsWhenConnectionCloseSetByServer), - ("testBiDirectionalStreaming", testBiDirectionalStreaming), - ("testResponseAccumulatorMaxBodySizeLimitExceedingWithContentLength", testResponseAccumulatorMaxBodySizeLimitExceedingWithContentLength), - ("testResponseAccumulatorMaxBodySizeLimitNotExceedingWithContentLength", testResponseAccumulatorMaxBodySizeLimitNotExceedingWithContentLength), - ("testResponseAccumulatorMaxBodySizeLimitExceedingWithContentLengthButMethodIsHead", testResponseAccumulatorMaxBodySizeLimitExceedingWithContentLengthButMethodIsHead), - ("testResponseAccumulatorMaxBodySizeLimitExceedingWithTransferEncodingChuncked", testResponseAccumulatorMaxBodySizeLimitExceedingWithTransferEncodingChuncked), - ("testResponseAccumulatorMaxBodySizeLimitNotExceedingWithTransferEncodingChuncked", testResponseAccumulatorMaxBodySizeLimitNotExceedingWithTransferEncodingChuncked), - ("testBiDirectionalStreamingEarly200", testBiDirectionalStreamingEarly200), - ("testBiDirectionalStreamingEarly200DoesntPreventUsFromSendingMoreRequests", testBiDirectionalStreamingEarly200DoesntPreventUsFromSendingMoreRequests), - ("testCloseConnectionAfterEarly2XXWhenStreaming", testCloseConnectionAfterEarly2XXWhenStreaming), - ("testSynchronousHandshakeErrorReporting", testSynchronousHandshakeErrorReporting), - ("testFileDownloadChunked", testFileDownloadChunked), - ("testCloseWhileBackpressureIsExertedIsFine", testCloseWhileBackpressureIsExertedIsFine), - ("testErrorAfterCloseWhileBackpressureExerted", testErrorAfterCloseWhileBackpressureExerted), - ("testRequestSpecificTLS", testRequestSpecificTLS), - ("testRequestWithHeaderTransferEncodingIdentityDoesNotFail", testRequestWithHeaderTransferEncodingIdentityDoesNotFail), - ("testMassiveDownload", testMassiveDownload), - ("testShutdownWithFutures", testShutdownWithFutures), - ("testMassiveHeaderHTTP1", testMassiveHeaderHTTP1), - ("testMassiveHeaderHTTP2", testMassiveHeaderHTTP2), - ("testCancelingHTTP1RequestAfterHeaderSend", testCancelingHTTP1RequestAfterHeaderSend), - ("testCancelingHTTP2RequestAfterHeaderSend", testCancelingHTTP2RequestAfterHeaderSend), - ("testMaxConnectionReusesHTTP1", testMaxConnectionReusesHTTP1), - ("testMaxConnectionReusesHTTP2", testMaxConnectionReusesHTTP2), - ("testMaxConnectionReusesExceedsMaxConcurrentStreamsForHTTP2", testMaxConnectionReusesExceedsMaxConcurrentStreamsForHTTP2), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTPClientUncleanSSLConnectionShutdownTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPClientUncleanSSLConnectionShutdownTests+XCTest.swift deleted file mode 100644 index d95346673..000000000 --- a/Tests/AsyncHTTPClientTests/HTTPClientUncleanSSLConnectionShutdownTests+XCTest.swift +++ /dev/null @@ -1,36 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTPClientUncleanSSLConnectionShutdownTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTPClientUncleanSSLConnectionShutdownTests { - static var allTests: [(String, (HTTPClientUncleanSSLConnectionShutdownTests) -> () throws -> Void)] { - return [ - ("testEOFFramedSuccess", testEOFFramedSuccess), - ("testContentLength", testContentLength), - ("testContentLengthButTruncated", testContentLengthButTruncated), - ("testTransferEncoding", testTransferEncoding), - ("testTransferEncodingButTruncated", testTransferEncodingButTruncated), - ("testConnectionDrop", testConnectionDrop), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTPConnectionPool+FactoryTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPConnectionPool+FactoryTests+XCTest.swift deleted file mode 100644 index 898b2b867..000000000 --- a/Tests/AsyncHTTPClientTests/HTTPConnectionPool+FactoryTests+XCTest.swift +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTPConnectionPool+FactoryTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTPConnectionPool_FactoryTests { - static var allTests: [(String, (HTTPConnectionPool_FactoryTests) -> () throws -> Void)] { - return [ - ("testConnectionCreationTimesoutIfDeadlineIsInThePast", testConnectionCreationTimesoutIfDeadlineIsInThePast), - ("testSOCKSConnectionCreationTimesoutIfRemoteIsUnresponsive", testSOCKSConnectionCreationTimesoutIfRemoteIsUnresponsive), - ("testHTTPProxyConnectionCreationTimesoutIfRemoteIsUnresponsive", testHTTPProxyConnectionCreationTimesoutIfRemoteIsUnresponsive), - ("testTLSConnectionCreationTimesoutIfRemoteIsUnresponsive", testTLSConnectionCreationTimesoutIfRemoteIsUnresponsive), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTPConnectionPool+HTTP1ConnectionsTest+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPConnectionPool+HTTP1ConnectionsTest+XCTest.swift deleted file mode 100644 index 21eb3029e..000000000 --- a/Tests/AsyncHTTPClientTests/HTTPConnectionPool+HTTP1ConnectionsTest+XCTest.swift +++ /dev/null @@ -1,47 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTPConnectionPool+HTTP1ConnectionsTest+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTPConnectionPool_HTTP1ConnectionsTests { - static var allTests: [(String, (HTTPConnectionPool_HTTP1ConnectionsTests) -> () throws -> Void)] { - return [ - ("testCreatingConnections", testCreatingConnections), - ("testCreatingConnectionAndFailing", testCreatingConnectionAndFailing), - ("testLeaseConnectionOnPreferredAndAvailableEL", testLeaseConnectionOnPreferredAndAvailableEL), - ("testLeaseConnectionOnPreferredButUnavailableEL", testLeaseConnectionOnPreferredButUnavailableEL), - ("testLeaseConnectionOnRequiredButUnavailableEL", testLeaseConnectionOnRequiredButUnavailableEL), - ("testLeaseConnectionOnRequiredAndAvailableEL", testLeaseConnectionOnRequiredAndAvailableEL), - ("testCloseConnectionIfIdle", testCloseConnectionIfIdle), - ("testCloseConnectionIfIdleButLeasedRaceCondition", testCloseConnectionIfIdleButLeasedRaceCondition), - ("testCloseConnectionIfIdleButClosedRaceCondition", testCloseConnectionIfIdleButClosedRaceCondition), - ("testShutdown", testShutdown), - ("testMigrationFromHTTP2", testMigrationFromHTTP2), - ("testMigrationFromHTTP2WithPendingRequestsWithRequiredEventLoop", testMigrationFromHTTP2WithPendingRequestsWithRequiredEventLoop), - ("testMigrationFromHTTP2WithPendingRequestsWithPreferredEventLoop", testMigrationFromHTTP2WithPendingRequestsWithPreferredEventLoop), - ("testMigrationFromHTTP2WithAlreadyLeasedHTTP1Connection", testMigrationFromHTTP2WithAlreadyLeasedHTTP1Connection), - ("testMigrationFromHTTP2WithMoreStartingConnectionsThanMaximumAllowedConccurentConnections", testMigrationFromHTTP2WithMoreStartingConnectionsThanMaximumAllowedConccurentConnections), - ("testMigrationFromHTTP2StartsEnoghOverflowConnectionsForRequiredEventLoopRequests", testMigrationFromHTTP2StartsEnoghOverflowConnectionsForRequiredEventLoopRequests), - ("testMigrationFromHTTP1ToHTTP2AndBackToHTTP1", testMigrationFromHTTP1ToHTTP2AndBackToHTTP1), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTPConnectionPool+HTTP1StateTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPConnectionPool+HTTP1StateTests+XCTest.swift deleted file mode 100644 index d50ab9893..000000000 --- a/Tests/AsyncHTTPClientTests/HTTPConnectionPool+HTTP1StateTests+XCTest.swift +++ /dev/null @@ -1,47 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTPConnectionPool+HTTP1StateTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTPConnectionPool_HTTP1StateMachineTests { - static var allTests: [(String, (HTTPConnectionPool_HTTP1StateMachineTests) -> () throws -> Void)] { - return [ - ("testCreatingAndFailingConnections", testCreatingAndFailingConnections), - ("testCreatingAndFailingConnectionsWithoutRetry", testCreatingAndFailingConnectionsWithoutRetry), - ("testConnectionFailureBackoff", testConnectionFailureBackoff), - ("testCancelRequestWorks", testCancelRequestWorks), - ("testExecuteOnShuttingDownPool", testExecuteOnShuttingDownPool), - ("testRequestsAreQueuedIfAllConnectionsAreInUseAndRequestsAreDequeuedInOrder", testRequestsAreQueuedIfAllConnectionsAreInUseAndRequestsAreDequeuedInOrder), - ("testBestConnectionIsPicked", testBestConnectionIsPicked), - ("testConnectionAbortIsIgnoredIfThereAreNoQueuedRequests", testConnectionAbortIsIgnoredIfThereAreNoQueuedRequests), - ("testConnectionCloseLeadsToTumbleWeedIfThereNoQueuedRequests", testConnectionCloseLeadsToTumbleWeedIfThereNoQueuedRequests), - ("testConnectionAbortLeadsToNewConnectionsIfThereAreQueuedRequests", testConnectionAbortLeadsToNewConnectionsIfThereAreQueuedRequests), - ("testParkedConnectionTimesOut", testParkedConnectionTimesOut), - ("testConnectionPoolFullOfParkedConnectionsIsShutdownImmediately", testConnectionPoolFullOfParkedConnectionsIsShutdownImmediately), - ("testParkedConnectionTimesOutButIsAlsoClosedByRemote", testParkedConnectionTimesOutButIsAlsoClosedByRemote), - ("testConnectionBackoffVsShutdownRace", testConnectionBackoffVsShutdownRace), - ("testRequestThatTimesOutIsFailedWithLastConnectionCreationError", testRequestThatTimesOutIsFailedWithLastConnectionCreationError), - ("testRequestThatTimesOutBeforeAConnectionIsEstablishedIsFailedWithConnectTimeoutError", testRequestThatTimesOutBeforeAConnectionIsEstablishedIsFailedWithConnectTimeoutError), - ("testRequestThatTimesOutAfterAConnectionWasEstablishedSuccessfullyTimesOutWithGenericError", testRequestThatTimesOutAfterAConnectionWasEstablishedSuccessfullyTimesOutWithGenericError), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTPConnectionPool+HTTP2ConnectionsTest+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPConnectionPool+HTTP2ConnectionsTest+XCTest.swift deleted file mode 100644 index 95cade669..000000000 --- a/Tests/AsyncHTTPClientTests/HTTPConnectionPool+HTTP2ConnectionsTest+XCTest.swift +++ /dev/null @@ -1,49 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTPConnectionPool+HTTP2ConnectionsTest+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTPConnectionPool_HTTP2ConnectionsTests { - static var allTests: [(String, (HTTPConnectionPool_HTTP2ConnectionsTests) -> () throws -> Void)] { - return [ - ("testCreatingConnections", testCreatingConnections), - ("testCreatingConnectionAndFailing", testCreatingConnectionAndFailing), - ("testFailConnectionRace", testFailConnectionRace), - ("testLeaseConnectionOfPreferredButUnavailableEL", testLeaseConnectionOfPreferredButUnavailableEL), - ("testLeaseConnectionOnRequiredButUnavailableEL", testLeaseConnectionOnRequiredButUnavailableEL), - ("testCloseConnectionIfIdle", testCloseConnectionIfIdle), - ("testCloseConnectionIfIdleButLeasedRaceCondition", testCloseConnectionIfIdleButLeasedRaceCondition), - ("testCloseConnectionIfIdleButClosedRaceCondition", testCloseConnectionIfIdleButClosedRaceCondition), - ("testCloseConnectionIfIdleRace", testCloseConnectionIfIdleRace), - ("testShutdown", testShutdown), - ("testLeasingAllConnections", testLeasingAllConnections), - ("testGoAway", testGoAway), - ("testNewMaxConcurrentStreamsSetting", testNewMaxConcurrentStreamsSetting), - ("testEventsAfterConnectionIsClosed", testEventsAfterConnectionIsClosed), - ("testLeaseOnPreferredEventLoopWithoutAnyAvailable", testLeaseOnPreferredEventLoopWithoutAnyAvailable), - ("testMigrationFromHTTP1", testMigrationFromHTTP1), - ("testMigrationToHTTP1", testMigrationToHTTP1), - ("testMigrationFromHTTP1WithPendingRequestsWithRequiredEventLoop", testMigrationFromHTTP1WithPendingRequestsWithRequiredEventLoop), - ("testMigrationFromHTTP1WithAlreadyEstablishedHTTP2Connection", testMigrationFromHTTP1WithAlreadyEstablishedHTTP2Connection), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTPConnectionPool+HTTP2StateMachineTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPConnectionPool+HTTP2StateMachineTests+XCTest.swift deleted file mode 100644 index 12b031cc0..000000000 --- a/Tests/AsyncHTTPClientTests/HTTPConnectionPool+HTTP2StateMachineTests+XCTest.swift +++ /dev/null @@ -1,51 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTPConnectionPool+HTTP2StateMachineTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTPConnectionPool_HTTP2StateMachineTests { - static var allTests: [(String, (HTTPConnectionPool_HTTP2StateMachineTests) -> () throws -> Void)] { - return [ - ("testCreatingOfConnection", testCreatingOfConnection), - ("testConnectionFailureBackoff", testConnectionFailureBackoff), - ("testConnectionFailureWhileShuttingDown", testConnectionFailureWhileShuttingDown), - ("testConnectionFailureWithoutRetry", testConnectionFailureWithoutRetry), - ("testCancelRequestWorks", testCancelRequestWorks), - ("testExecuteOnShuttingDownPool", testExecuteOnShuttingDownPool), - ("testHTTP1ToHTTP2MigrationAndShutdownIfFirstConnectionIsHTTP1", testHTTP1ToHTTP2MigrationAndShutdownIfFirstConnectionIsHTTP1), - ("testSchedulingAndCancelingOfIdleTimeout", testSchedulingAndCancelingOfIdleTimeout), - ("testConnectionTimeout", testConnectionTimeout), - ("testConnectionEstablishmentFailure", testConnectionEstablishmentFailure), - ("testGoAwayOnIdleConnection", testGoAwayOnIdleConnection), - ("testGoAwayWithLeasedStream", testGoAwayWithLeasedStream), - ("testGoAwayWithPendingRequestsStartsNewConnection", testGoAwayWithPendingRequestsStartsNewConnection), - ("testMigrationFromHTTP1ToHTTP2", testMigrationFromHTTP1ToHTTP2), - ("testMigrationFromHTTP1ToHTTP2WhileShuttingDown", testMigrationFromHTTP1ToHTTP2WhileShuttingDown), - ("testMigrationFromHTTP1ToHTTP2WithAlreadyStartedHTTP1Connections", testMigrationFromHTTP1ToHTTP2WithAlreadyStartedHTTP1Connections), - ("testHTTP2toHTTP1Migration", testHTTP2toHTTP1Migration), - ("testHTTP2toHTTP1MigrationDuringShutdown", testHTTP2toHTTP1MigrationDuringShutdown), - ("testConnectionIsImmediatelyCreatedAfterBackoffTimerFires", testConnectionIsImmediatelyCreatedAfterBackoffTimerFires), - ("testMaxConcurrentStreamsIsRespected", testMaxConcurrentStreamsIsRespected), - ("testEventsAfterConnectionIsClosed", testEventsAfterConnectionIsClosed), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTPConnectionPool+ManagerTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPConnectionPool+ManagerTests+XCTest.swift deleted file mode 100644 index 93945f63c..000000000 --- a/Tests/AsyncHTTPClientTests/HTTPConnectionPool+ManagerTests+XCTest.swift +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTPConnectionPool+ManagerTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTPConnectionPool_ManagerTests { - static var allTests: [(String, (HTTPConnectionPool_ManagerTests) -> () throws -> Void)] { - return [ - ("testManagerHappyPath", testManagerHappyPath), - ("testShutdownManagerThatHasSeenNoConnections", testShutdownManagerThatHasSeenNoConnections), - ("testExecutingARequestOnAShutdownPoolManager", testExecutingARequestOnAShutdownPoolManager), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTPConnectionPool+RequestQueueTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPConnectionPool+RequestQueueTests+XCTest.swift deleted file mode 100644 index 2511ba267..000000000 --- a/Tests/AsyncHTTPClientTests/HTTPConnectionPool+RequestQueueTests+XCTest.swift +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTPConnectionPool+RequestQueueTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTPConnectionPool_RequestQueueTests { - static var allTests: [(String, (HTTPConnectionPool_RequestQueueTests) -> () throws -> Void)] { - return [ - ("testCountAndIsEmptyWorks", testCountAndIsEmptyWorks), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTPConnectionPoolTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPConnectionPoolTests+XCTest.swift deleted file mode 100644 index acdc0ab26..000000000 --- a/Tests/AsyncHTTPClientTests/HTTPConnectionPoolTests+XCTest.swift +++ /dev/null @@ -1,39 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTPConnectionPoolTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTPConnectionPoolTests { - static var allTests: [(String, (HTTPConnectionPoolTests) -> () throws -> Void)] { - return [ - ("testOnlyOneConnectionIsUsedForSubSequentRequests", testOnlyOneConnectionIsUsedForSubSequentRequests), - ("testConnectionsForEventLoopRequirementsAreClosed", testConnectionsForEventLoopRequirementsAreClosed), - ("testConnectionPoolGrowsToMaxConcurrentConnections", testConnectionPoolGrowsToMaxConcurrentConnections), - ("testConnectionCreationIsRetriedUntilRequestIsFailed", testConnectionCreationIsRetriedUntilRequestIsFailed), - ("testConnectionCreationIsRetriedUntilPoolIsShutdown", testConnectionCreationIsRetriedUntilPoolIsShutdown), - ("testConnectionCreationIsRetriedUntilRequestIsCancelled", testConnectionCreationIsRetriedUntilRequestIsCancelled), - ("testConnectionShutdownIsCalledOnActiveConnections", testConnectionShutdownIsCalledOnActiveConnections), - ("testConnectionPoolStressResistanceHTTP1", testConnectionPoolStressResistanceHTTP1), - ("testBackoffBehavesSensibly", testBackoffBehavesSensibly), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/HTTPRequestStateMachineTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPRequestStateMachineTests+XCTest.swift deleted file mode 100644 index ad85bd71e..000000000 --- a/Tests/AsyncHTTPClientTests/HTTPRequestStateMachineTests+XCTest.swift +++ /dev/null @@ -1,67 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// HTTPRequestStateMachineTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension HTTPRequestStateMachineTests { - static var allTests: [(String, (HTTPRequestStateMachineTests) -> () throws -> Void)] { - return [ - ("testSimpleGETRequest", testSimpleGETRequest), - ("testPOSTRequestWithWriterBackpressure", testPOSTRequestWithWriterBackpressure), - ("testPOSTContentLengthIsTooLong", testPOSTContentLengthIsTooLong), - ("testPOSTContentLengthIsTooShort", testPOSTContentLengthIsTooShort), - ("testRequestBodyStreamIsCancelledIfServerRespondsWith301", testRequestBodyStreamIsCancelledIfServerRespondsWith301), - ("testStreamPartReceived_whenCancelled", testStreamPartReceived_whenCancelled), - ("testRequestBodyStreamIsCancelledIfServerRespondsWith301WhileWriteBackpressure", testRequestBodyStreamIsCancelledIfServerRespondsWith301WhileWriteBackpressure), - ("testRequestBodyStreamIsContinuedIfServerRespondsWith200", testRequestBodyStreamIsContinuedIfServerRespondsWith200), - ("testRequestBodyStreamIsContinuedIfServerSendHeadWithStatus200", testRequestBodyStreamIsContinuedIfServerSendHeadWithStatus200), - ("testRequestIsFailedIfRequestBodySizeIsWrongEvenAfterServerRespondedWith200", testRequestIsFailedIfRequestBodySizeIsWrongEvenAfterServerRespondedWith200), - ("testRequestIsFailedIfRequestBodySizeIsWrongEvenAfterServerSendHeadWithStatus200", testRequestIsFailedIfRequestBodySizeIsWrongEvenAfterServerSendHeadWithStatus200), - ("testRequestIsNotSendUntilChannelIsWritable", testRequestIsNotSendUntilChannelIsWritable), - ("testConnectionBecomesInactiveWhileWaitingForWritable", testConnectionBecomesInactiveWhileWaitingForWritable), - ("testResponseReadingWithBackpressure", testResponseReadingWithBackpressure), - ("testChannelReadCompleteTriggersButNoBodyDataWasReceivedSoFar", testChannelReadCompleteTriggersButNoBodyDataWasReceivedSoFar), - ("testResponseReadingWithBackpressureEndOfResponseAllowsReadEventsToTriggerDirectly", testResponseReadingWithBackpressureEndOfResponseAllowsReadEventsToTriggerDirectly), - ("testCancellingARequestInStateInitializedKeepsTheConnectionAlive", testCancellingARequestInStateInitializedKeepsTheConnectionAlive), - ("testCancellingARequestBeforeBeingSendKeepsTheConnectionAlive", testCancellingARequestBeforeBeingSendKeepsTheConnectionAlive), - ("testConnectionBecomesWritableBeforeFirstRequest", testConnectionBecomesWritableBeforeFirstRequest), - ("testCancellingARequestThatIsSent", testCancellingARequestThatIsSent), - ("testRemoteSuddenlyClosesTheConnection", testRemoteSuddenlyClosesTheConnection), - ("testReadTimeoutLeadsToFailureWithEverythingAfterBeingIgnored", testReadTimeoutLeadsToFailureWithEverythingAfterBeingIgnored), - ("testResponseWithStatus1XXAreIgnored", testResponseWithStatus1XXAreIgnored), - ("testReadTimeoutThatFiresToLateIsIgnored", testReadTimeoutThatFiresToLateIsIgnored), - ("testCancellationThatIsInvokedToLateIsIgnored", testCancellationThatIsInvokedToLateIsIgnored), - ("testErrorWhileRunningARequestClosesTheStream", testErrorWhileRunningARequestClosesTheStream), - ("testCanReadHTTP1_0ResponseWithoutBody", testCanReadHTTP1_0ResponseWithoutBody), - ("testCanReadHTTP1_0ResponseWithBody", testCanReadHTTP1_0ResponseWithBody), - ("testFailHTTP1_0RequestThatIsStillUploading", testFailHTTP1_0RequestThatIsStillUploading), - ("testFailHTTP1RequestWithoutContentLengthWithNIOSSLErrorUncleanShutdown", testFailHTTP1RequestWithoutContentLengthWithNIOSSLErrorUncleanShutdown), - ("testNIOSSLErrorUncleanShutdownShouldBeTreatedAsRemoteConnectionCloseWhileInWaitingForHeadState", testNIOSSLErrorUncleanShutdownShouldBeTreatedAsRemoteConnectionCloseWhileInWaitingForHeadState), - ("testArbitraryErrorShouldBeTreatedAsARequestFailureWhileInWaitingForHeadState", testArbitraryErrorShouldBeTreatedAsARequestFailureWhileInWaitingForHeadState), - ("testFailHTTP1RequestWithContentLengthWithNIOSSLErrorUncleanShutdownButIgnoreIt", testFailHTTP1RequestWithContentLengthWithNIOSSLErrorUncleanShutdownButIgnoreIt), - ("testFailHTTPRequestWithContentLengthBecauseOfChannelInactiveWaitingForDemand", testFailHTTPRequestWithContentLengthBecauseOfChannelInactiveWaitingForDemand), - ("testFailHTTPRequestWithContentLengthBecauseOfChannelInactiveWaitingForRead", testFailHTTPRequestWithContentLengthBecauseOfChannelInactiveWaitingForRead), - ("testFailHTTPRequestWithContentLengthBecauseOfChannelInactiveWaitingForReadAndDemand", testFailHTTPRequestWithContentLengthBecauseOfChannelInactiveWaitingForReadAndDemand), - ("testFailHTTPRequestWithContentLengthBecauseOfChannelInactiveWaitingForReadAndDemandMultipleTimes", testFailHTTPRequestWithContentLengthBecauseOfChannelInactiveWaitingForReadAndDemandMultipleTimes), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/IdleTimeoutNoReuseTests+XCTest.swift b/Tests/AsyncHTTPClientTests/IdleTimeoutNoReuseTests+XCTest.swift deleted file mode 100644 index b496d527c..000000000 --- a/Tests/AsyncHTTPClientTests/IdleTimeoutNoReuseTests+XCTest.swift +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// IdleTimeoutNoReuseTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension TestIdleTimeoutNoReuse { - static var allTests: [(String, (TestIdleTimeoutNoReuse) -> () throws -> Void)] { - return [ - ("testIdleTimeoutNoReuse", testIdleTimeoutNoReuse), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/LRUCacheTests+XCTest.swift b/Tests/AsyncHTTPClientTests/LRUCacheTests+XCTest.swift deleted file mode 100644 index a0231bf0d..000000000 --- a/Tests/AsyncHTTPClientTests/LRUCacheTests+XCTest.swift +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// LRUCacheTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension LRUCacheTests { - static var allTests: [(String, (LRUCacheTests) -> () throws -> Void)] { - return [ - ("testBasicsWork", testBasicsWork), - ("testCachesTheRightThings", testCachesTheRightThings), - ("testAppendingTheSameDoesNotEvictButUpdates", testAppendingTheSameDoesNotEvictButUpdates), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/NoBytesSentOverBodyLimitTests+XCTest.swift b/Tests/AsyncHTTPClientTests/NoBytesSentOverBodyLimitTests+XCTest.swift deleted file mode 100644 index 9ed1ca2a8..000000000 --- a/Tests/AsyncHTTPClientTests/NoBytesSentOverBodyLimitTests+XCTest.swift +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// NoBytesSentOverBodyLimitTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension NoBytesSentOverBodyLimitTests { - static var allTests: [(String, (NoBytesSentOverBodyLimitTests) -> () throws -> Void)] { - return [ - ("testNoBytesSentOverBodyLimit", testNoBytesSentOverBodyLimit), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/RacePoolIdleConnectionsAndGetTests+XCTest.swift b/Tests/AsyncHTTPClientTests/RacePoolIdleConnectionsAndGetTests+XCTest.swift deleted file mode 100644 index b4aa20dad..000000000 --- a/Tests/AsyncHTTPClientTests/RacePoolIdleConnectionsAndGetTests+XCTest.swift +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// RacePoolIdleConnectionsAndGetTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension RacePoolIdleConnectionsAndGetTests { - static var allTests: [(String, (RacePoolIdleConnectionsAndGetTests) -> () throws -> Void)] { - return [ - ("testRacePoolIdleConnectionsAndGet", testRacePoolIdleConnectionsAndGet), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/RequestBagTests+XCTest.swift b/Tests/AsyncHTTPClientTests/RequestBagTests+XCTest.swift deleted file mode 100644 index 53c152c06..000000000 --- a/Tests/AsyncHTTPClientTests/RequestBagTests+XCTest.swift +++ /dev/null @@ -1,46 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// RequestBagTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension RequestBagTests { - static var allTests: [(String, (RequestBagTests) -> () throws -> Void)] { - return [ - ("testWriteBackpressureWorks", testWriteBackpressureWorks), - ("testTaskIsFailedIfWritingFails", testTaskIsFailedIfWritingFails), - ("testCancelFailsTaskBeforeRequestIsSent", testCancelFailsTaskBeforeRequestIsSent), - ("testDeadlineExceededFailsTaskEvenIfRaceBetweenCancelingSchedulerAndRequestStart", testDeadlineExceededFailsTaskEvenIfRaceBetweenCancelingSchedulerAndRequestStart), - ("testCancelHasNoEffectAfterDeadlineExceededFailsTask", testCancelHasNoEffectAfterDeadlineExceededFailsTask), - ("testCancelFailsTaskAfterRequestIsSent", testCancelFailsTaskAfterRequestIsSent), - ("testCancelFailsTaskWhenTaskIsQueued", testCancelFailsTaskWhenTaskIsQueued), - ("testFailsTaskWhenTaskIsWaitingForMoreFromServer", testFailsTaskWhenTaskIsWaitingForMoreFromServer), - ("testChannelBecomingWritableDoesntCrashCancelledTask", testChannelBecomingWritableDoesntCrashCancelledTask), - ("testDidReceiveBodyPartFailedPromise", testDidReceiveBodyPartFailedPromise), - ("testHTTPUploadIsCancelledEvenThoughRequestSucceeds", testHTTPUploadIsCancelledEvenThoughRequestSucceeds), - ("testRaceBetweenConnectionCloseAndDemandMoreData", testRaceBetweenConnectionCloseAndDemandMoreData), - ("testRedirectWith3KBBody", testRedirectWith3KBBody), - ("testRedirectWith4KBBodyAnnouncedInResponseHead", testRedirectWith4KBBodyAnnouncedInResponseHead), - ("testRedirectWith4KBBodyNotAnnouncedInResponseHead", testRedirectWith4KBBodyNotAnnouncedInResponseHead), - ("testWeDontLeakTheRequestIfTheRequestWriterWasCapturedByAPromise", testWeDontLeakTheRequestIfTheRequestWriterWasCapturedByAPromise), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/RequestValidationTests+XCTest.swift b/Tests/AsyncHTTPClientTests/RequestValidationTests+XCTest.swift deleted file mode 100644 index 3a93d70ec..000000000 --- a/Tests/AsyncHTTPClientTests/RequestValidationTests+XCTest.swift +++ /dev/null @@ -1,52 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// RequestValidationTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension RequestValidationTests { - static var allTests: [(String, (RequestValidationTests) -> () throws -> Void)] { - return [ - ("testContentLengthHeaderIsRemovedFromGETIfNoBody", testContentLengthHeaderIsRemovedFromGETIfNoBody), - ("testContentLengthHeaderIsAddedToPOSTAndPUTWithNoBody", testContentLengthHeaderIsAddedToPOSTAndPUTWithNoBody), - ("testContentLengthHeaderIsChangedIfBodyHasDifferentLength", testContentLengthHeaderIsChangedIfBodyHasDifferentLength), - ("testTRACERequestMustNotHaveBody", testTRACERequestMustNotHaveBody), - ("testGET_HEAD_DELETE_CONNECTRequestCanHaveBody", testGET_HEAD_DELETE_CONNECTRequestCanHaveBody), - ("testInvalidHeaderFieldNames", testInvalidHeaderFieldNames), - ("testValidHeaderFieldNames", testValidHeaderFieldNames), - ("testMetadataDetectConnectionClose", testMetadataDetectConnectionClose), - ("testMetadataDefaultIsConnectionCloseIsFalse", testMetadataDefaultIsConnectionCloseIsFalse), - ("testNoHeadersNoBody", testNoHeadersNoBody), - ("testNoHeadersHasBody", testNoHeadersHasBody), - ("testContentLengthHeaderNoBody", testContentLengthHeaderNoBody), - ("testContentLengthHeaderHasBody", testContentLengthHeaderHasBody), - ("testTransferEncodingHeaderNoBody", testTransferEncodingHeaderNoBody), - ("testTransferEncodingHeaderHasBody", testTransferEncodingHeaderHasBody), - ("testBothHeadersNoBody", testBothHeadersNoBody), - ("testBothHeadersHasBody", testBothHeadersHasBody), - ("testHostHeaderIsSetCorrectlyInCreateRequestHead", testHostHeaderIsSetCorrectlyInCreateRequestHead), - ("testTraceMethodIsNotAllowedToHaveAFixedLengthBody", testTraceMethodIsNotAllowedToHaveAFixedLengthBody), - ("testTraceMethodIsNotAllowedToHaveADynamicLengthBody", testTraceMethodIsNotAllowedToHaveADynamicLengthBody), - ("testTransferEncodingsAreOverwrittenIfBodyLengthIsFixed", testTransferEncodingsAreOverwrittenIfBodyLengthIsFixed), - ("testTransferEncodingsAreOverwrittenIfBodyLengthIsDynamic", testTransferEncodingsAreOverwrittenIfBodyLengthIsDynamic), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/ResponseDelayGetTests+XCTest.swift b/Tests/AsyncHTTPClientTests/ResponseDelayGetTests+XCTest.swift deleted file mode 100644 index 5d3c8bfb1..000000000 --- a/Tests/AsyncHTTPClientTests/ResponseDelayGetTests+XCTest.swift +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// ResponseDelayGetTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension ResponseDelayGetTests { - static var allTests: [(String, (ResponseDelayGetTests) -> () throws -> Void)] { - return [ - ("testResponseDelayGet", testResponseDelayGet), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/SOCKSEventsHandlerTests+XCTest.swift b/Tests/AsyncHTTPClientTests/SOCKSEventsHandlerTests+XCTest.swift deleted file mode 100644 index 0338adf3c..000000000 --- a/Tests/AsyncHTTPClientTests/SOCKSEventsHandlerTests+XCTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// SOCKSEventsHandlerTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension SOCKSEventsHandlerTests { - static var allTests: [(String, (SOCKSEventsHandlerTests) -> () throws -> Void)] { - return [ - ("testHandlerHappyPath", testHandlerHappyPath), - ("testHandlerFailsFutureWhenRemovedWithoutEvent", testHandlerFailsFutureWhenRemovedWithoutEvent), - ("testHandlerFailsFutureWhenHandshakeFails", testHandlerFailsFutureWhenHandshakeFails), - ("testHandlerClosesConnectionIfHandshakeTimesout", testHandlerClosesConnectionIfHandshakeTimesout), - ("testHandlerWorksIfDeadlineIsInPast", testHandlerWorksIfDeadlineIsInPast), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/SSLContextCacheTests+XCTest.swift b/Tests/AsyncHTTPClientTests/SSLContextCacheTests+XCTest.swift deleted file mode 100644 index d98f5a853..000000000 --- a/Tests/AsyncHTTPClientTests/SSLContextCacheTests+XCTest.swift +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// SSLContextCacheTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension SSLContextCacheTests { - static var allTests: [(String, (SSLContextCacheTests) -> () throws -> Void)] { - return [ - ("testRequestingSSLContextWorks", testRequestingSSLContextWorks), - ("testCacheWorks", testCacheWorks), - ("testCacheDoesNotReturnWrongEntry", testCacheDoesNotReturnWrongEntry), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/StressGetHttpsTests+XCTest.swift b/Tests/AsyncHTTPClientTests/StressGetHttpsTests+XCTest.swift deleted file mode 100644 index faf64cb19..000000000 --- a/Tests/AsyncHTTPClientTests/StressGetHttpsTests+XCTest.swift +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// StressGetHttpsTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension StressGetHttpsTests { - static var allTests: [(String, (StressGetHttpsTests) -> () throws -> Void)] { - return [ - ("testStressGetHttps", testStressGetHttps), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/TLSEventsHandlerTests+XCTest.swift b/Tests/AsyncHTTPClientTests/TLSEventsHandlerTests+XCTest.swift deleted file mode 100644 index 062132f4e..000000000 --- a/Tests/AsyncHTTPClientTests/TLSEventsHandlerTests+XCTest.swift +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// TLSEventsHandlerTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension TLSEventsHandlerTests { - static var allTests: [(String, (TLSEventsHandlerTests) -> () throws -> Void)] { - return [ - ("testHandlerHappyPath", testHandlerHappyPath), - ("testHandlerFailsFutureWhenRemovedWithoutEvent", testHandlerFailsFutureWhenRemovedWithoutEvent), - ("testHandlerFailsFutureWhenHandshakeFails", testHandlerFailsFutureWhenHandshakeFails), - ("testHandlerIgnoresShutdownCompletedEvent", testHandlerIgnoresShutdownCompletedEvent), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/Transaction+StateMachineTests+XCTest.swift b/Tests/AsyncHTTPClientTests/Transaction+StateMachineTests+XCTest.swift deleted file mode 100644 index f86344137..000000000 --- a/Tests/AsyncHTTPClientTests/Transaction+StateMachineTests+XCTest.swift +++ /dev/null @@ -1,37 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// Transaction+StateMachineTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension Transaction_StateMachineTests { - static var allTests: [(String, (Transaction_StateMachineTests) -> () throws -> Void)] { - return [ - ("testRequestWasQueuedAfterWillExecuteRequestWasCalled", testRequestWasQueuedAfterWillExecuteRequestWasCalled), - ("testRequestBodyStreamWasPaused", testRequestBodyStreamWasPaused), - ("testQueuedRequestGetsRemovedWhenDeadlineExceeded", testQueuedRequestGetsRemovedWhenDeadlineExceeded), - ("testDeadlineExceededAndFullyFailedRequestCanBeCanceledWithNoEffect", testDeadlineExceededAndFullyFailedRequestCanBeCanceledWithNoEffect), - ("testScheduledRequestGetsRemovedWhenDeadlineExceeded", testScheduledRequestGetsRemovedWhenDeadlineExceeded), - ("testDeadlineExceededRaceWithRequestWillExecute", testDeadlineExceededRaceWithRequestWillExecute), - ("testRequestWithHeadReceivedGetNotCancelledWhenDeadlineExceeded", testRequestWithHeadReceivedGetNotCancelledWhenDeadlineExceeded), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/TransactionTests+XCTest.swift b/Tests/AsyncHTTPClientTests/TransactionTests+XCTest.swift deleted file mode 100644 index de63914a9..000000000 --- a/Tests/AsyncHTTPClientTests/TransactionTests+XCTest.swift +++ /dev/null @@ -1,40 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// TransactionTests+XCTest.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -extension TransactionTests { - static var allTests: [(String, (TransactionTests) -> () throws -> Void)] { - return [ - ("testCancelAsyncRequest", testCancelAsyncRequest), - ("testDeadlineExceededWhileQueuedAndExecutorImmediatelyCancelsTask", testDeadlineExceededWhileQueuedAndExecutorImmediatelyCancelsTask), - ("testResponseStreamingWorks", testResponseStreamingWorks), - ("testIgnoringResponseBodyWorks", testIgnoringResponseBodyWorks), - ("testWriteBackpressureWorks", testWriteBackpressureWorks), - ("testSimpleGetRequest", testSimpleGetRequest), - ("testSimplePostRequest", testSimplePostRequest), - ("testPostStreamFails", testPostStreamFails), - ("testResponseStreamFails", testResponseStreamFails), - ("testBiDirectionalStreamingHTTP2", testBiDirectionalStreamingHTTP2), - ] - } -} diff --git a/Tests/AsyncHTTPClientTests/TransactionTests.swift b/Tests/AsyncHTTPClientTests/TransactionTests.swift index 79a0b83af..19454681c 100644 --- a/Tests/AsyncHTTPClientTests/TransactionTests.swift +++ b/Tests/AsyncHTTPClientTests/TransactionTests.swift @@ -580,10 +580,7 @@ actor SharedIterator where Wrapped.Element: Sendable { self.nextCallInProgress = true var iter = self.wrappedIterator defer { - // auto-closure of `precondition(_:)` messes with actor isolation analyses in Swift 5.5 - // we therefore need to move the access to `self.nextCallInProgress` out of the auto-closure - let nextCallInProgress = nextCallInProgress - precondition(nextCallInProgress == true) + precondition(self.nextCallInProgress == true) self.nextCallInProgress = false self.wrappedIterator = iter } diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift deleted file mode 100644 index 886bf2b95..000000000 --- a/Tests/LinuxMain.swift +++ /dev/null @@ -1,76 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// LinuxMain.swift -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - -#if os(Linux) || os(FreeBSD) -@testable import AsyncHTTPClientTests - -@main -struct LinuxMain { - static func main() { - XCTMain([ - testCase(AsyncAwaitEndToEndTests.allTests), - testCase(ConnectionPoolSizeConfigValueIsRespectedTests.allTests), - testCase(HTTP1ClientChannelHandlerTests.allTests), - testCase(HTTP1ConnectionStateMachineTests.allTests), - testCase(HTTP1ConnectionTests.allTests), - testCase(HTTP1ProxyConnectHandlerTests.allTests), - testCase(HTTP2ClientRequestHandlerTests.allTests), - testCase(HTTP2ClientTests.allTests), - testCase(HTTP2ConnectionTests.allTests), - testCase(HTTP2IdleHandlerTests.allTests), - testCase(HTTPClientCookieTests.allTests), - testCase(HTTPClientInternalTests.allTests), - testCase(HTTPClientNIOTSTests.allTests), - testCase(HTTPClientReproTests.allTests), - testCase(HTTPClientRequestTests.allTests), - testCase(HTTPClientResponseTests.allTests), - testCase(HTTPClientSOCKSTests.allTests), - testCase(HTTPClientTests.allTests), - testCase(HTTPClientUncleanSSLConnectionShutdownTests.allTests), - testCase(HTTPConnectionPoolTests.allTests), - testCase(HTTPConnectionPool_FactoryTests.allTests), - testCase(HTTPConnectionPool_HTTP1ConnectionsTests.allTests), - testCase(HTTPConnectionPool_HTTP1StateMachineTests.allTests), - testCase(HTTPConnectionPool_HTTP2ConnectionsTests.allTests), - testCase(HTTPConnectionPool_HTTP2StateMachineTests.allTests), - testCase(HTTPConnectionPool_ManagerTests.allTests), - testCase(HTTPConnectionPool_RequestQueueTests.allTests), - testCase(HTTPRequestStateMachineTests.allTests), - testCase(LRUCacheTests.allTests), - testCase(NoBytesSentOverBodyLimitTests.allTests), - testCase(RacePoolIdleConnectionsAndGetTests.allTests), - testCase(RequestBagTests.allTests), - testCase(RequestValidationTests.allTests), - testCase(ResponseDelayGetTests.allTests), - testCase(SOCKSEventsHandlerTests.allTests), - testCase(SSLContextCacheTests.allTests), - testCase(StressGetHttpsTests.allTests), - testCase(TLSEventsHandlerTests.allTests), - testCase(TestIdleTimeoutNoReuse.allTests), - testCase(TransactionTests.allTests), - testCase(Transaction_StateMachineTests.allTests), - ]) - } -} -#endif diff --git a/docker/docker-compose.2004.55.yaml b/docker/docker-compose.2004.55.yaml deleted file mode 100644 index d181ef142..000000000 --- a/docker/docker-compose.2004.55.yaml +++ /dev/null @@ -1,22 +0,0 @@ -version: "3" - -services: - - runtime-setup: - image: async-http-client:20.04-5.5 - build: - args: - ubuntu_version: "focal" - swift_version: "5.5" - - documentation-check: - image: async-http-client:20.04-5.5 - - test: - image: async-http-client:20.04-5.5 - command: /bin/bash -xcl "swift test --parallel -Xswiftc -warnings-as-errors $${SANITIZER_ARG-}" - environment: [] - #- SANITIZER_ARG=--sanitize=thread - - shell: - image: async-http-client:20.04-5.5 diff --git a/scripts/generate_linux_tests.rb b/scripts/generate_linux_tests.rb deleted file mode 100755 index fe5726f6c..000000000 --- a/scripts/generate_linux_tests.rb +++ /dev/null @@ -1,236 +0,0 @@ -#!/usr/bin/env ruby - -# -# process_test_files.rb -# -# Copyright 2016 Tony Stone -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Created by Tony Stone on 5/4/16. -# -require 'getoptlong' -require 'fileutils' -require 'pathname' - -include FileUtils - -# -# This ruby script will auto generate LinuxMain.swift and the +XCTest.swift extension files for Swift Package Manager on Linux platforms. -# -# See https://github.com/apple/swift-corelibs-xctest/blob/master/Documentation/Linux.md -# -def header(fileName) - string = <<-eos -//===----------------------------------------------------------------------===// -// -// This source file is part of the AsyncHTTPClient open source project -// -// Copyright (c) 2018-2019 Apple Inc. and the AsyncHTTPClient project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// -// -// -// -import XCTest - -/// -/// NOTE: This file was generated by generate_linux_tests.rb -/// -/// Do NOT edit this file directly as it will be regenerated automatically when needed. -/// - eos - - string - .sub('', File.basename(fileName)) - .sub('', Time.now.to_s) -end - -def createExtensionFile(fileName, classes) - extensionFile = fileName.sub! '.swift', '+XCTest.swift' - print 'Creating file: ' + extensionFile + "\n" - - File.open(extensionFile, 'w') do |file| - file.write header(extensionFile) - file.write "\n" - - for classArray in classes - file.write 'extension ' + classArray[0] + " {\n" - file.write ' static var allTests: [(String, (' + classArray[0] + ") -> () throws -> Void)] {\n" - file.write " return [\n" - - for funcName in classArray[1] - file.write ' ("' + funcName + '", ' + funcName + "),\n" - end - - file.write " ]\n" - file.write " }\n" - file.write "}\n" - end - end -end - -def createLinuxMain(testsDirectory, allTestSubDirectories, files) - fileName = testsDirectory + '/LinuxMain.swift' - print 'Creating file: ' + fileName + "\n" - - File.open(fileName, 'w') do |file| - file.write header(fileName) - file.write "\n" - - file.write "#if os(Linux) || os(FreeBSD)\n" - for testSubDirectory in allTestSubDirectories.sort { |x, y| x <=> y } - file.write '@testable import ' + testSubDirectory + "\n" - end - file.write "\n" - file.write "@main\n" - file.write "struct LinuxMain {\n" - file.write " static func main() {\n" - file.write " XCTMain([\n" - - testCases = [] - for classes in files - for classArray in classes - testCases << classArray[0] - end - end - - for testCase in testCases.sort { |x, y| x <=> y } - file.write ' testCase(' + testCase + ".allTests),\n" - end - file.write " ])\n" - file.write " }\n" - file.write "}\n" - file.write "#endif\n" - end -end - -def parseSourceFile(fileName) - puts 'Parsing file: ' + fileName + "\n" - - classes = [] - currentClass = nil - inIfLinux = false - inElse = false - ignore = false - - # - # Read the file line by line - # and parse to find the class - # names and func names - # - File.readlines(fileName).each do |line| - if inIfLinux - if /\#else/.match(line) - inElse = true - ignore = true - else - if /\#end/.match(line) - inElse = false - inIfLinux = false - ignore = false - end - end - else - if /\#if[ \t]+os\(Linux\)/.match(line) - inIfLinux = true - ignore = false - end - end - - next if ignore - # Match class or func - match = line[/class[ \t]+[a-zA-Z0-9_]*(?=[ \t]*:[ \t]*XCTestCase)|func[ \t]+test[a-zA-Z0-9_]*(?=[ \t]*\(\))/, 0] - if match - - if match[/class/, 0] == 'class' - className = match.sub(/^class[ \t]+/, '') - # - # Create a new class / func structure - # and add it to the classes array. - # - currentClass = [className, []] - classes << currentClass - else # Must be a func - funcName = match.sub(/^func[ \t]+/, '') - # - # Add each func name the the class / func - # structure created above. - # - currentClass[1] << funcName - end - end - end - classes -end - -# -# Main routine -# -# - -testsDirectory = 'Tests' - -options = GetoptLong.new(['--tests-dir', GetoptLong::OPTIONAL_ARGUMENT]) -options.quiet = true - -begin - options.each do |option, value| - case option - when '--tests-dir' - testsDirectory = value - end - end -rescue GetoptLong::InvalidOption -end - -allTestSubDirectories = [] -allFiles = [] - -Dir[testsDirectory + '/*'].each do |subDirectory| - next unless File.directory?(subDirectory) - directoryHasClasses = false - Dir[subDirectory + '/*Test{s,}.swift'].each do |fileName| - next unless File.file? fileName - fileClasses = parseSourceFile(fileName) - - # - # If there are classes in the - # test source file, create an extension - # file for it. - # - next unless fileClasses.count > 0 - createExtensionFile(fileName, fileClasses) - directoryHasClasses = true - allFiles << fileClasses - end - - if directoryHasClasses - allTestSubDirectories << Pathname.new(subDirectory).split.last.to_s - end -end - -# -# Last step is the create a LinuxMain.swift file that -# references all the classes and funcs in the source files. -# -if allFiles.count > 0 - createLinuxMain(testsDirectory, allTestSubDirectories, allFiles) -end -# eof diff --git a/scripts/soundness.sh b/scripts/soundness.sh index 6d37546e8..216eab206 100755 --- a/scripts/soundness.sh +++ b/scripts/soundness.sh @@ -21,18 +21,6 @@ function replace_acceptable_years() { sed -e 's/20[12][0-9]-20[12][0-9]/YEARS/' -e 's/20[12][0-9]/YEARS/' } -printf "=> Checking linux tests... " -FIRST_OUT="$(git status --porcelain)" -ruby "$here/../scripts/generate_linux_tests.rb" > /dev/null -SECOND_OUT="$(git status --porcelain)" -if [[ "$FIRST_OUT" != "$SECOND_OUT" ]]; then - printf "\033[0;31mmissing changes!\033[0m\n" - git --no-pager diff - exit 1 -else - printf "\033[0;32mokay.\033[0m\n" -fi - printf "=> Checking for unacceptable language... " # This greps for unacceptable terminology. The square bracket[s] are so that # "git grep" doesn't find the lines that greps :).