swift-server / swift-server/async-http-client

flaky test `HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected`

Open
#499 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/testing
Dominant language
Swift
Stars
1.1k
Forks
156
PR merge metrics
No merged PRs in 30d

Description

Failed on Swift 5.2 CI:
https://ci.swiftserver.group/job/async-http-client-swift52-prb/1008/console

Test Case 'HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected' started at 2021-11-25 17:33:23.508
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2971: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : failed - Timed out
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.cancelled" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.cancelled" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.cancelled" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.cancelled" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.cancelled" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.cancelled" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.cancelled" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.alreadyShutdown" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.alreadyShutdown" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.cancelled" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.cancelled" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.cancelled" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.alreadyShutdown" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.alreadyShutdown" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.alreadyShutdown" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.alreadyShutdown" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.cancelled" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.alreadyShutdown" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.alreadyShutdown" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.alreadyShutdown" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.cancelled" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.alreadyShutdown" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.alreadyShutdown" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.cancelled" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.alreadyShutdown" - 
ERROR: Cannot schedule tasks on an EventLoop that has already shut down. This will be upgraded to a forced crash in future SwiftNIO versions.
ERROR: Cannot schedule tasks on an EventLoop that has already shut down. This will be upgraded to a forced crash in future SwiftNIO versions.
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.alreadyShutdown" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.alreadyShutdown" - 
ERROR: Cannot schedule tasks on an EventLoop that has already shut down. This will be upgraded to a forced crash in future SwiftNIO versions.
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.alreadyShutdown" - 
ERROR: Cannot schedule tasks on an EventLoop that has already shut down. This will be upgraded to a forced crash in future SwiftNIO versions.
ERROR: Cannot schedule tasks on an EventLoop that has already shut down. This will be upgraded to a forced crash in future SwiftNIO versions.
ERROR: Cannot schedule tasks on an EventLoop that has already shut down. This will be upgraded to a forced crash in future SwiftNIO versions.
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.alreadyShutdown" - 
ERROR: Cannot schedule tasks on an EventLoop that has already shut down. This will be upgraded to a forced crash in future SwiftNIO versions.
ERROR: Cannot schedule tasks on an EventLoop that has already shut down. This will be upgraded to a forced crash in future SwiftNIO versions.
ERROR: Cannot schedule tasks on an EventLoop that has already shut down. This will be upgraded to a forced crash in future SwiftNIO versions.
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.alreadyShutdown" - 
ERROR: Cannot schedule tasks on an EventLoop that has already shut down. This will be upgraded to a forced crash in future SwiftNIO versions.
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.alreadyShutdown" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.alreadyShutdown" - 
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.alreadyShutdown" - 
ERROR: Cannot schedule tasks on an EventLoop that has already shut down. This will be upgraded to a forced crash in future SwiftNIO versions.
ERROR: Cannot schedule tasks on an EventLoop that has already shut down. This will be upgraded to a forced crash in future SwiftNIO versions.
ERROR: Cannot schedule tasks on an EventLoop that has already shut down. This will be upgraded to a forced crash in future SwiftNIO versions.
ERROR: Cannot schedule tasks on an EventLoop that has already shut down. This will be upgraded to a forced crash in future SwiftNIO versions.
/code/Tests/AsyncHTTPClientTests/HTTPClientTests.swift:2959: error: HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected : XCTAssertNoThrow failed: threw error "HTTPClientError.alreadyShutdown" - 
ERROR: Cannot schedule tasks on an EventLoop that has already shut down. This will be upgraded to a forced crash in future SwiftNIO versions.
ERROR: Cannot schedule tasks on an EventLoop that has already shut down. This will be upgraded to a forced crash in future SwiftNIO versions.
ERROR: Cannot schedule tasks on an EventLoop that has already shut down. This will be upgraded to a forced crash in future SwiftNIO versions.
ERROR: Cannot schedule tasks on an EventLoop that has already shut down. This will be upgraded to a forced crash in future SwiftNIO versions.
Test Case 'HTTPClientTests.testConnectionPoolSizeConfigValueIsRespected' failed (60.047 seconds)

Failure observed before enabling parallel testing on CI.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Tests/AsyncHTTPClientTests/HTTPClientTests.swift around testConnectionPoolSizeConfigValueIsRespected, especially the assertions at lines 2959 and 2971. Reproduce the failure using the linked Swift 5.2 CI run or the corresponding test locally, then trace the cancellation and already-shutdown errors. Done means the test reliably completes without timing out or scheduling work on a shut-down EventLoop.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.