Fix test_async_drain_connection flakiness

Sometimes [1] 5 seconds is not enough, since drain_timeout is 3 seconds,
and 2 seconds sometimes is not enough to do other things, especially
under sanitizers:

    E           Code: 159. DB::Exception: Received from 172.16.1.2:9000. DB::Exception: Timeout exceeded: elapsed 5.019254094 seconds, maximum: 5. Stack trace:

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/0/826f7cb0f53e20e67ef52800cb735bb88a6de658/integration_tests__thread__actions__[4/4].html
This commit is contained in:
Azat Khuzhin 2021-12-25 11:52:57 +03:00
parent da211909e9
commit 42ab02a810

View File

@ -28,6 +28,9 @@ def test_filled_async_drain_connection_pool(started_cluster):
node.query('select * from t where number = 0 limit 2', settings={
'sleep_in_receive_cancel_ms': int(10e6),
'max_execution_time': 5,
# decrease drain_timeout to make test more stable
# (another way is to increase max_execution_time, but this will make test slower)
'drain_timeout': 1,
})
any(map(execute_queries, range(10)))