Fix test_connection_cleanup_on_read_timeout
pquentin opened this issue · comments
Quentin Pradet commented
So we have this failing test named test_connection_cleanup_on_read_timeout
. @RatanShreshtha investigated to understand the situation. Here's the test:
The test fails because the connection is not returned to the pool, so poolsize != pool.pool.qsize()
. In the bleach-spike branch, the connection is only released when the response is complete
:
The response is complete when the client and server h11 states are IDLE
:
This is True when the request has completed successfully, but it should be also be True when there's not a clean exit. So I think the fix is to make sure the state comes back to idle when self.close()
is called.
Quentin Pradet commented