From 40bdad80882d307abe2c0bb36cf3bd4d3e03fe04 Mon Sep 17 00:00:00 2001 From: David Evans Date: Fri, 1 May 2020 19:17:44 +0100 Subject: [PATCH] Add 5.3 CI (#1498) (cherry picked from commit 8da802c5ebd2bb139dcd684f7f3c995001193574) --- .../NIOConcurrencyHelpersTests.swift | 2 +- Tests/NIOHTTP1Tests/HTTPDecoderTest.swift | 5 -- docker/docker-compose.1604.52.yaml | 3 +- docker/docker-compose.1604.53.yaml | 48 +++++++++++++++++++ ...04.51.yaml => docker-compose.1804.51.yaml} | 21 ++++---- 5 files changed, 61 insertions(+), 18 deletions(-) create mode 100644 docker/docker-compose.1604.53.yaml rename docker/{docker-compose.1604.51.yaml => docker-compose.1804.51.yaml} (76%) diff --git a/Tests/NIOConcurrencyHelpersTests/NIOConcurrencyHelpersTests.swift b/Tests/NIOConcurrencyHelpersTests/NIOConcurrencyHelpersTests.swift index d0014dfb7..541b6af32 100644 --- a/Tests/NIOConcurrencyHelpersTests/NIOConcurrencyHelpersTests.swift +++ b/Tests/NIOConcurrencyHelpersTests/NIOConcurrencyHelpersTests.swift @@ -856,7 +856,7 @@ class NIOConcurrencyHelpersTests: XCTestCase { } doIt() assert(weakF == nil, within: .seconds(1)) - assert(weakF == nil, within: .seconds(1)) + assert(weakG == nil, within: .seconds(1)) } @available(*, deprecated, message: "AtomicBox is deprecated, this is a test for the deprecated functionality") diff --git a/Tests/NIOHTTP1Tests/HTTPDecoderTest.swift b/Tests/NIOHTTP1Tests/HTTPDecoderTest.swift index 7c35b193e..24fc15b8f 100644 --- a/Tests/NIOHTTP1Tests/HTTPDecoderTest.swift +++ b/Tests/NIOHTTP1Tests/HTTPDecoderTest.swift @@ -245,16 +245,11 @@ class HTTPDecoderTest: XCTestCase { } func handlerAdded(context: ChannelHandlerContext) { - var fulfilledImmediately = true - defer { - fulfilledImmediately = false - } context.pipeline.removeHandler(name: "decoder").whenComplete { result in _ = result.mapError { (error: Error) -> Error in XCTFail("unexpected error \(error)") return error } - //XCTAssertTrue(fulfilledImmediately) } } diff --git a/docker/docker-compose.1604.52.yaml b/docker/docker-compose.1604.52.yaml index 1e0a471e0..2dabf9bc2 100644 --- a/docker/docker-compose.1604.52.yaml +++ b/docker/docker-compose.1604.52.yaml @@ -6,7 +6,8 @@ services: image: swift-nio:16.04-5.2 build: args: - base_image: "swiftlang/swift:nightly-5.2-xenial" + ubuntu_version: "xenial" + swift_version: "5.2" unit-tests: image: swift-nio:16.04-5.2 diff --git a/docker/docker-compose.1604.53.yaml b/docker/docker-compose.1604.53.yaml new file mode 100644 index 000000000..c9260637c --- /dev/null +++ b/docker/docker-compose.1604.53.yaml @@ -0,0 +1,48 @@ +version: "3" + +services: + + runtime-setup: + image: swift-nio:16.04-5.3 + build: + args: + base_image: "swiftlang/swift:nightly-5.3-xenial" + + unit-tests: + image: swift-nio:16.04-5.3 + + integration-tests: + image: swift-nio:16.04-5.3 + + test: + image: swift-nio:16.04-5.3 + environment: + - MAX_ALLOCS_ALLOWED_1000_reqs_1_conn=30540 + - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=486500 #5.3 improvement 491050 + - MAX_ALLOCS_ALLOWED_ping_pong_1000_reqs_1_conn=4440 + - MAX_ALLOCS_ALLOWED_bytebuffer_lots_of_rw=2100 + - MAX_ALLOCS_ALLOWED_future_lots_of_callbacks=75010 + - MAX_ALLOCS_ALLOWED_creating_10000_headers=100 + - MAX_ALLOCS_ALLOWED_scheduling_10000_executions=20150 + - MAX_ALLOCS_ALLOWED_modifying_1000_circular_buffer_elements=50 + - MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_holding_buffer=1010 + - MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_holding_buffer_with_space=1010 + - MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_new_buffer=4010 + - MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_new_buffer_with_space=4010 + - MAX_ALLOCS_ALLOWED_decode_1000_ws_frames=1000 + - MAX_ALLOCS_ALLOWED_modifying_byte_buffer_view=2010 + - MAX_ALLOCS_ALLOWED_schedule_10000_tasks=90050 + - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=200500 #5.3 improvement 210050 + - SANITIZER_ARG=--sanitize=thread + + performance-test: + image: swift-nio:16.04-5.3 + + shell: + image: swift-nio:16.04-5.3 + + echo: + image: swift-nio:16.04-5.3 + + http: + image: swift-nio:16.04-5.3 diff --git a/docker/docker-compose.1604.51.yaml b/docker/docker-compose.1804.51.yaml similarity index 76% rename from docker/docker-compose.1604.51.yaml rename to docker/docker-compose.1804.51.yaml index 19af52c34..66ffa32d1 100644 --- a/docker/docker-compose.1604.51.yaml +++ b/docker/docker-compose.1804.51.yaml @@ -3,20 +3,20 @@ version: "3" services: runtime-setup: - image: swift-nio:16.04-5.1 + image: swift-nio:18.04-5.1 build: args: - ubuntu_version: "xenial" - swift_version: "5.1.3" + ubuntu_version: "bionic" + swift_version: "5.1" unit-tests: - image: swift-nio:16.04-5.1 + image: swift-nio:18.04-5.1 integration-tests: - image: swift-nio:16.04-5.1 + image: swift-nio:18.04-5.1 test: - image: swift-nio:16.04-5.1 + image: swift-nio:18.04-5.1 environment: - MAX_ALLOCS_ALLOWED_1000_reqs_1_conn=30540 - MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=488050 @@ -34,16 +34,15 @@ services: - MAX_ALLOCS_ALLOWED_modifying_byte_buffer_view=6010 - MAX_ALLOCS_ALLOWED_schedule_10000_tasks=90050 - MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=210050 - - SANITIZER_ARG=--sanitize=thread performance-test: - image: swift-nio:16.04-5.1 + image: swift-nio:18.04-5.1 shell: - image: swift-nio:16.04-5.1 + image: swift-nio:18.04-5.1 echo: - image: swift-nio:16.04-5.1 + image: swift-nio:18.04-5.1 http: - image: swift-nio:16.04-5.1 + image: swift-nio:18.04-5.1