Skip to content
Myr

Add ConnectTimeout test

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tom Christie · committed by Tom Christie · parent 8e1a263 · Browse files · 1 file+10 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+10 added−0 removed

  • tests:+10 added−0 removed

1 file+10 added−0 removed

modified:tests/test_timeouts.py+10 added
11 unmodified lines
12 await http.request("GET", "http://127.0.0.1:8000/slow_response")131415@pytest.mark.asyncio16async def test_connect_timeout(server):17 timeout = httpcore.TimeoutConfig(connect_timeout=0.0001)1819 async with httpcore.ConnectionPool(timeout=timeout) as http:20 with pytest.raises(httpcore.ConnectTimeout):21 # See https://stackoverflow.com/questions/100841/22 await http.request("GET", "http://10.255.255.1/")232425@pytest.mark.asyncio26async def test_pool_timeout(server):27 timeout = httpcore.TimeoutConfig(pool_timeout=0.0001)28 limits = httpcore.PoolLimits(hard_limit=1)29
7 unmodified lines