Broken HTTP2 cancellations tests #755
Replies: 3 comments 1 reply
-
(As a starting point...)
Could you provide a link/example for this? |
Beta Was this translation helpful? Give feedback.
1 reply
-
You can get that error by inserting Like so self._sent_connection_init = True
# Initially start with just 1 until the remote server provides
# its max_concurrent_streams value
self._max_streams = 1
local_settings_max_streams = (
self._h2_state.local_settings.max_concurrent_streams
)
self._max_streams_semaphore = AsyncSemaphore(local_settings_max_streams)
await anyio.sleep(0.5)
for _ in range(local_settings_max_streams - self._max_streams):
await self._max_streams_semaphore.acquire()
await self._max_streams_semaphore.acquire() This line may cause a Canceled Error, which we do not handle. We use timeout 0.01 in tests, so I frequently get failing tests on my local machine. await self._max_streams_semaphore.acquire() |
Beta Was this translation helpful? Give feedback.
0 replies
-
Issue: #756 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sometimes http2 connection cancellation tests fail, but other times they succeed.
The issue appears to be in
AsyncHTTP2Connection's
async_handle_request
method, which cannot always handle cancelled errors.If the cancellation happens in this section of the code, the connection will not call the response_closed method.
Beta Was this translation helpful? Give feedback.
All reactions