Skip to content

flaky test: testConnectionPoolGrowsToMaxConcurrentConnections #508

Open
@karwa

Description

@karwa

There are a couple of issues with testConnectionPoolGrowsToMaxConcurrentConnections:

  • The maxConnections variable isn't passed down to the ConnectionPool constructor. The expected value 8 happens to match the default, but shouldn't this test use a non-default value, to check that the parameter works?

  • It checks:

    XCTAssertEqual(httpBin.createdConnections, maxConnections)

    But actually, httpBin.createdConnections > maxConnections is also valid. The ConnectionsCountHandler doesn't actually measure the maximum number of active connections it saw -- just the total number that were created. If I have a couple of Xcode projects open, some Safari windows each with lots of tabs, I can see 10 created connections (even though when logging, I see that the maximum concurrent connections parameter was always respected).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions