Skip to content

Commit f20777d

Browse files
Make CI green again (#1128) (#1152)
* Fix tests for new version of `ConcurrentUtilities` `ConcurrentUtilities` changed an (internal) fieldname of the `Pool` type from `max` to `limit`. This field is used in HTTP.jl tests so this patch works around the issue. * Remove invalidation CI check This has been failing for quite some time with some internal error. Also in the working case it is a bit unclear what the actionable thing is when it errors (xref #920 (comment)). Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com>
1 parent 6a3b0a9 commit f20777d

File tree

2 files changed

+8
-45
lines changed

2 files changed

+8
-45
lines changed

.github/workflows/Invalidations.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

test/client.jl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,15 @@ using URIs
1313
using InteractiveUtils: @which
1414
using ConcurrentUtilities
1515

16+
# ConcurrentUtilities changed a fieldname from max to limit in 2.3.0
17+
const max_or_limit = :max in fieldnames(ConcurrentUtilities.Pool) ? (:max) : (:limit)
18+
1619
# test we can adjust default_connection_limit
1720
for x in (10, 12)
1821
HTTP.set_default_connection_limit!(x)
19-
@test HTTP.Connections.TCP_POOL[].max == x
20-
@test HTTP.Connections.MBEDTLS_POOL[].max == x
21-
@test HTTP.Connections.OPENSSL_POOL[].max == x
22+
@test getfield(HTTP.Connections.TCP_POOL[], max_or_limit) == x
23+
@test getfield(HTTP.Connections.MBEDTLS_POOL[], max_or_limit) == x
24+
@test getfield(HTTP.Connections.OPENSSL_POOL[], max_or_limit) == x
2225
end
2326

2427
@testset "@client macro" begin
@@ -325,11 +328,11 @@ end
325328
end
326329

327330
@testset "connect_timeout does not include the time needed to acquire a connection from the pool" begin
328-
connection_limit = HTTP.Connections.TCP_POOL[].max
331+
connection_limit = getfield(HTTP.Connections.TCP_POOL[], max_or_limit)
329332
try
330333
dummy_conn = HTTP.Connection(Sockets.TCPSocket())
331334
HTTP.set_default_connection_limit!(1)
332-
@assert HTTP.Connections.TCP_POOL[].max == 1
335+
@assert getfield(HTTP.Connections.TCP_POOL[], max_or_limit) == 1
333336
# drain the pool
334337
acquire(()->dummy_conn, HTTP.Connections.TCP_POOL[], HTTP.Connections.connectionkey(dummy_conn))
335338
# Put it back in 10 seconds

0 commit comments

Comments
 (0)