Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

flaky tests HTTPClientTests.testClientProxyPlaintext & HTTPClientTests.testClientProxyTLS #370

Open
weissi opened this issue Aug 30, 2019 · 3 comments

Comments

@weissi
Copy link

weissi commented Aug 30, 2019

$ swift test
Fetching https://github.com/apple/swift-nio.git
Fetching https://github.com/apple/swift-nio-ssl.git
Fetching https://github.com/apple/swift-nio-http2.git
Fetching https://github.com/apple/swift-nio-extras.git
Fetching https://github.com/apple/swift-log.git
Completed resolution in 5.60s
Cloning https://github.com/apple/swift-nio-ssl.git
Resolving https://github.com/apple/swift-nio-ssl.git at 2.4.0
Cloning https://github.com/apple/swift-log.git
Resolving https://github.com/apple/swift-log.git at master
Cloning https://github.com/apple/swift-nio-http2.git
Resolving https://github.com/apple/swift-nio-http2.git at 1.5.0
Cloning https://github.com/apple/swift-nio.git
Resolving https://github.com/apple/swift-nio.git at 2.7.1
Cloning https://github.com/apple/swift-nio-extras.git
Resolving https://github.com/apple/swift-nio-extras.git at 1.2.0
/home/jweiss/extsrc/http/Sources/HTTPKit/WebSocket/HTTPResponse+WebSocket.swift:7:24: warning: 'WebSocketUpgrader' is deprecated: renamed to 'NIOWebSocketServerUpgrader'
        let upgrader = WebSocketUpgrader(shouldUpgrade: { channel, _ in
                       ^
/home/jweiss/extsrc/http/Sources/HTTPKit/WebSocket/HTTPResponse+WebSocket.swift:7:24: note: use 'NIOWebSocketServerUpgrader' instead
        let upgrader = WebSocketUpgrader(shouldUpgrade: { channel, _ in
                       ^~~~~~~~~~~~~~~~~
                       NIOWebSocketServerUpgrader
/home/jweiss/extsrc/http/Sources/HTTPKit/WebSocket/WebSocket+Client.swift:4:14: warning: TODO: consider making non-static
    #warning("TODO: consider making non-static")
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jweiss/extsrc/http/Sources/HTTPKit/WebSocket/WebSocketHandler.swift:76:26: warning: TODO: pass buffered results
                #warning("TODO: pass buffered results")
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jweiss/extsrc/http/Sources/HTTPKit/WebSocket/WebSocketHandler.swift:73:16: warning: variable 'frameSequence' was never mutated; consider changing to 'let' constant
        if var frameSequence = self.frameSequence, frame.fin {
           ~~~ ^
           let
/home/jweiss/extsrc/http/Sources/HTTPKit/Exports.swift:18:31: warning: conformance of 'HTTPRequestEncoder' to protocol 'RemovableChannelHandler' was already stated in the type's module 'NIOHTTP1'
extension HTTPRequestEncoder: RemovableChannelHandler { }
                              ^
NIOHTTP1.HTTPRequestEncoder:1:20: note: 'HTTPRequestEncoder' declares conformance to protocol 'RemovableChannelHandler' here
final public class HTTPRequestEncoder : ChannelOutboundHandler, RemovableChannelHandler {
                   ^
/home/jweiss/extsrc/http/Sources/HTTPKit/Server/HTTPRequestPartDecoder.swift:81:18: warning: TODO: https://github.com/apple/swift-nio/issues/849
        #warning("TODO: https://github.com/apple/swift-nio/issues/849")
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jweiss/extsrc/http/Sources/HTTPKit/Server/HTTPResponsePartEncoder.swift:50:26: warning: TODO: use nio foundation compat
                #warning("TODO: use nio foundation compat")
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jweiss/extsrc/http/Sources/HTTPKit/Server/HTTPServer.swift:193:18: warning: TODO: create shutdown timeout
        #warning("TODO: create shutdown timeout")
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jweiss/extsrc/http/Sources/HTTPKitExample/main.swift:68:33: warning: 'file' is deprecated: Use 'NIOSSLCertificate.fromPEMFile(_:)' to load the certificate(s) and use the '.certificate(NIOSSLCertificate)' case to provide them as a source
            certificateChain: [.file("/Users/tanner0101/dev/vapor/http-kit/certs/cert.pem")],
                                ^
/home/jweiss/extsrc/http/Tests/HTTPKitTests/HTTPClientTests.swift:54:13: warning: initialization of immutable value 'httpRes' was never used; consider replacing with assignment to '_' or removing it
        let httpRes = try client.send(httpReq).wait()
        ~~~~^~~~~~~
        _
[457/457] Linking ./.build/x86_64-unknown-linux/debug/http-kitPackageTests.xctest
Test Suite 'All tests' started at 2019-08-30 14:25:19.916
Test Suite 'debug.xctest' started at 2019-08-30 14:25:19.918
Test Suite 'HTTPClientTests' started at 2019-08-30 14:25:19.918
Test Case 'HTTPClientTests.testClientDefaultConfig' started at 2019-08-30 14:25:19.918
Test Case 'HTTPClientTests.testClientDefaultConfig' passed (0.672 seconds)
Test Case 'HTTPClientTests.testClientProxyPlaintext' started at 2019-08-30 14:25:20.591
<EXPR>:0: error: HTTPClientTests.testClientProxyPlaintext : threw error "NIOConnectionError(host: "127.0.0.1", port: 8888, dnsAError: nil, dnsAAAAError: nil, connectionErrors: [NIO.SingleConnectionFailure(target: [IPv4]127.0.0.1/127.0.0.1:8888, error: connection reset (error set): Connection refused (errno: 111))])"
Test Case 'HTTPClientTests.testClientProxyPlaintext' failed (0.006 seconds)
Test Case 'HTTPClientTests.testClientProxyTLS' started at 2019-08-30 14:25:20.597
<EXPR>:0: error: HTTPClientTests.testClientProxyTLS : threw error "NIOConnectionError(host: "127.0.0.1", port: 8888, dnsAError: nil, dnsAAAAError: nil, connectionErrors: [NIO.SingleConnectionFailure(target: [IPv4]127.0.0.1/127.0.0.1:8888, error: connection reset (error set): Connection refused (errno: 111))])"
Test Case 'HTTPClientTests.testClientProxyTLS' failed (0.004 seconds)
Test Case 'HTTPClientTests.testExampleCom' started at 2019-08-30 14:25:20.600
Test Case 'HTTPClientTests.testExampleCom' passed (0.492 seconds)
Test Case 'HTTPClientTests.testGoogleAPIsFCM' started at 2019-08-30 14:25:21.092
Test Case 'HTTPClientTests.testGoogleAPIsFCM' passed (0.068 seconds)
Test Case 'HTTPClientTests.testGoogleWithTLS' started at 2019-08-30 14:25:21.160
Test Case 'HTTPClientTests.testGoogleWithTLS' passed (1.954 seconds)
Test Case 'HTTPClientTests.testHTTPBin418' started at 2019-08-30 14:25:23.114
Test Case 'HTTPClientTests.testHTTPBin418' passed (0.534 seconds)
Test Case 'HTTPClientTests.testHTTPBinAnything' started at 2019-08-30 14:25:23.648
Test Case 'HTTPClientTests.testHTTPBinAnything' passed (0.528 seconds)
Test Case 'HTTPClientTests.testHTTPBinRobots' started at 2019-08-30 14:25:24.177
Test Case 'HTTPClientTests.testHTTPBinRobots' passed (0.527 seconds)
Test Case 'HTTPClientTests.testQuery' started at 2019-08-30 14:25:24.703
Test Case 'HTTPClientTests.testQuery' passed (0.529 seconds)
Test Case 'HTTPClientTests.testRemotePeer' started at 2019-08-30 14:25:25.232
Test Case 'HTTPClientTests.testRemotePeer' passed (0.152 seconds)
Test Case 'HTTPClientTests.testSNIWebsite' started at 2019-08-30 14:25:25.384
Test Case 'HTTPClientTests.testSNIWebsite' passed (3.256 seconds)
Test Case 'HTTPClientTests.testUncleanShutdown' started at 2019-08-30 14:25:28.641
Test Case 'HTTPClientTests.testUncleanShutdown' passed (0.942 seconds)
Test Case 'HTTPClientTests.testVaporWithTLS' started at 2019-08-30 14:25:29.583
Test Case 'HTTPClientTests.testVaporWithTLS' passed (1.57 seconds)
Test Case 'HTTPClientTests.testZombo' started at 2019-08-30 14:25:31.153
Test Case 'HTTPClientTests.testZombo' passed (0.764 seconds)
Test Suite 'HTTPClientTests' failed at 2019-08-30 14:25:31.917
	 Executed 15 tests, with 2 failures (2 unexpected) in 11.999 (11.999) seconds
Test Suite 'HTTPCookieTests' started at 2019-08-30 14:25:31.918
Test Case 'HTTPCookieTests.testCookieIsSerializedCorrectly' started at 2019-08-30 14:25:31.918
Test Case 'HTTPCookieTests.testCookieIsSerializedCorrectly' passed (0.003 seconds)
Test Case 'HTTPCookieTests.testCookieParse' started at 2019-08-30 14:25:31.920
Test Case 'HTTPCookieTests.testCookieParse' passed (0.001 seconds)
Test Case 'HTTPCookieTests.testMultipleCookiesAreSerializedCorrectly' started at 2019-08-30 14:25:31.921
Test Case 'HTTPCookieTests.testMultipleCookiesAreSerializedCorrectly' passed (0.001 seconds)
Test Suite 'HTTPCookieTests' passed at 2019-08-30 14:25:31.923
	 Executed 3 tests, with 0 failures (0 unexpected) in 0.005 (0.005) seconds
Test Suite 'HTTPHeaderTests' started at 2019-08-30 14:25:31.923
Test Case 'HTTPHeaderTests.testAcceptHeader' started at 2019-08-30 14:25:31.923
Test Case 'HTTPHeaderTests.testAcceptHeader' passed (0.002 seconds)
Test Suite 'HTTPHeaderTests' passed at 2019-08-30 14:25:31.925
	 Executed 1 test, with 0 failures (0 unexpected) in 0.002 (0.002) seconds
Test Suite 'HTTPServerTests' started at 2019-08-30 14:25:31.925
Test Case 'HTTPServerTests.testLargeResponseClose' started at 2019-08-30 14:25:31.926
Test Case 'HTTPServerTests.testLargeResponseClose' passed (0.226 seconds)
Test Case 'HTTPServerTests.testRFC1123Flip' started at 2019-08-30 14:25:32.152
Test Case 'HTTPServerTests.testRFC1123Flip' passed (0.859 seconds)
Test Suite 'HTTPServerTests' passed at 2019-08-30 14:25:33.011
	 Executed 2 tests, with 0 failures (0 unexpected) in 1.085 (1.085) seconds
Test Suite 'WebSocketTests' started at 2019-08-30 14:25:33.011
Test Case 'WebSocketTests.testClient' started at 2019-08-30 14:25:33.011
Test Case 'WebSocketTests.testClient' passed (0.286 seconds)
Test Case 'WebSocketTests.testClientTLS' started at 2019-08-30 14:25:33.297
Test Case 'WebSocketTests.testClientTLS' passed (0.261 seconds)
Test Case 'WebSocketTests.testServer' started at 2019-08-30 14:25:33.559
Test Case 'WebSocketTests.testServer' passed (0.003 seconds)
Test Case 'WebSocketTests.testServerContinuation' started at 2019-08-30 14:25:33.561
Test Case 'WebSocketTests.testServerContinuation' passed (0.014 seconds)
Test Suite 'WebSocketTests' passed at 2019-08-30 14:25:33.576
	 Executed 4 tests, with 0 failures (0 unexpected) in 0.564 (0.564) seconds
Test Suite 'debug.xctest' failed at 2019-08-30 14:25:33.576
	 Executed 25 tests, with 2 failures (2 unexpected) in 13.656 (13.656) seconds
Test Suite 'All tests' failed at 2019-08-30 14:25:33.576
	 Executed 25 tests, with 2 failures (2 unexpected) in 13.656 (13.656) seconds
@weissi
Copy link
Author

weissi commented Aug 30, 2019

commit was

commit 3e49ea0b7c16ee0e0985babff9659d467d4f59fd (HEAD -> master, origin/master, origin/HEAD)
Author: Trevör <[email protected]>
Date:   Thu Apr 25 22:26:08 2019 +0200

@weissi
Copy link
Author

weissi commented Sep 9, 2019

still the same

@weissi
Copy link
Author

weissi commented Nov 27, 2019

@tanner0101 this is still unfixed:

Test Case '-[HTTPKitTests.HTTPClientTests testClientDefaultConfig]' passed (1.599 seconds).
Test Case '-[HTTPKitTests.HTTPClientTests testClientProxyPlaintext]' started.
<unknown>:0: error: -[HTTPKitTests.HTTPClientTests testClientProxyPlaintext] : failed: caught error: The operation couldn’t be completed. (NIO.NIOConnectionError error 1.)
Test Case '-[HTTPKitTests.HTTPClientTests testClientProxyPlaintext]' failed (0.005 seconds).
Test Case '-[HTTPKitTests.HTTPClientTests testClientProxyTLS]' started.
<unknown>:0: error: -[HTTPKitTests.HTTPClientTests testClientProxyTLS] : failed: caught error: The operation couldn’t be completed. (NIO.NIOConnectionError error 1.)
Test Case '-[HTTPKitTests.HTTPClientTests testClientProxyTLS]' failed (0.002 seconds).
Test Case '-[HTTPKitTests.HTTPClientTests testExampleCom]' started.
Test Case '-[HTTPKitTests.HTTPClientTests testExampleCom]' passed (2.297 seconds).
Test Case '-[HTTPKitTests.HTTPClientTests testGoogleAPIsFCM]' started.
<unknown>:0: error: -[HTTPKitTests.HTTPClientTests testGoogleAPIsFCM] : failed: caught error: The operation couldn’t be completed. (HTTPKitTests.TestError error 1.)
Test Case '-[HTTPKitTests.HTTPClientTests testGoogleAPIsFCM]' failed (0.201 seconds).
Test Case '-[HTTPKitTests.HTTPClientTests testGoogleWithTLS]' started.
Test Case '-[HTTPKitTests.HTTPClientTests testGoogleWithTLS]' passed (1.830 seconds).
Test Case '-[HTTPKitTests.HTTPClientTests testHTTPBin418]' started.
Test Case '-[HTTPKitTests.HTTPClientTests testHTTPBin418]' passed (0.601 seconds).
Test Case '-[HTTPKitTests.HTTPClientTests testHTTPBinAnything]' started.
Test Case '-[HTTPKitTests.HTTPClientTests testHTTPBinAnything]' passed (0.556 seconds).
Test Case '-[HTTPKitTests.HTTPClientTests testHTTPBinRobots]' started.
Test Case '-[HTTPKitTests.HTTPClientTests testHTTPBinRobots]' passed (0.780 seconds).
Test Case '-[HTTPKitTests.HTTPClientTests testQuery]' started.
Test Case '-[HTTPKitTests.HTTPClientTests testQuery]' passed (0.539 seconds).
Test Case '-[HTTPKitTests.HTTPClientTests testRemotePeer]' started.
Test Case '-[HTTPKitTests.HTTPClientTests testRemotePeer]' passed (0.421 seconds).
Test Case '-[HTTPKitTests.HTTPClientTests testSNIWebsite]' started.
<unknown>:0: error: -[HTTPKitTests.HTTPClientTests testSNIWebsite] : failed: caught error: The operation couldn’t be completed. (HTTPKitTests.TestError error 1.)
Test Case '-[HTTPKitTests.HTTPClientTests testSNIWebsite]' failed (0.247 seconds).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant