Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport "Make CI green again (#1128)" to v1.9 #1152

Merged
merged 1 commit into from
Feb 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions .github/workflows/Invalidations.yml

This file was deleted.

13 changes: 8 additions & 5 deletions test/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ using URIs
using InteractiveUtils: @which
using ConcurrentUtilities

# ConcurrentUtilities changed a fieldname from max to limit in 2.3.0
const max_or_limit = :max in fieldnames(ConcurrentUtilities.Pool) ? (:max) : (:limit)

# test we can adjust default_connection_limit
for x in (10, 12)
HTTP.set_default_connection_limit!(x)
@test HTTP.Connections.TCP_POOL[].max == x
@test HTTP.Connections.MBEDTLS_POOL[].max == x
@test HTTP.Connections.OPENSSL_POOL[].max == x
@test getfield(HTTP.Connections.TCP_POOL[], max_or_limit) == x
@test getfield(HTTP.Connections.MBEDTLS_POOL[], max_or_limit) == x
@test getfield(HTTP.Connections.OPENSSL_POOL[], max_or_limit) == x
end

@testset "@client macro" begin
Expand Down Expand Up @@ -325,11 +328,11 @@ end
end

@testset "connect_timeout does not include the time needed to acquire a connection from the pool" begin
connection_limit = HTTP.Connections.TCP_POOL[].max
connection_limit = getfield(HTTP.Connections.TCP_POOL[], max_or_limit)
try
dummy_conn = HTTP.Connection(Sockets.TCPSocket())
HTTP.set_default_connection_limit!(1)
@assert HTTP.Connections.TCP_POOL[].max == 1
@assert getfield(HTTP.Connections.TCP_POOL[], max_or_limit) == 1
# drain the pool
acquire(()->dummy_conn, HTTP.Connections.TCP_POOL[], HTTP.Connections.connectionkey(dummy_conn))
# Put it back in 10 seconds
Expand Down
Loading