Merge pull request #23275 from ClickHouse/fix-tests-hedged-requests

Fix integration tests for Hedged requests
This commit is contained in:
alexey-milovidov 2021-04-19 21:10:23 +03:00 committed by GitHub
commit f1706223be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -5,6 +5,8 @@
<load_balancing>in_order</load_balancing>
<hedged_connection_timeout_ms>100</hedged_connection_timeout_ms>
<receive_data_timeout_ms>2000</receive_data_timeout_ms>
<async_socket_for_remote>1</async_socket_for_remote>
<use_hedged_requests>1</use_hedged_requests>
</default>
</profiles>
</yandex>

View File

@ -6,6 +6,8 @@
<max_parallel_replicas>2</max_parallel_replicas>
<hedged_connection_timeout_ms>100</hedged_connection_timeout_ms>
<receive_data_timeout_ms>2000</receive_data_timeout_ms>
<async_socket_for_remote>1</async_socket_for_remote>
<use_hedged_requests>1</use_hedged_requests>
</default>
</profiles>
</yandex>

View File

@ -64,7 +64,7 @@ def test(started_cluster):
assert end - start < 10
start = time.time()
error = NODES['node1'].query_and_get_error('SELECT * FROM distributed_table settings receive_timeout=5, send_timeout=5, use_hedged_requests=0;')
error = NODES['node1'].query_and_get_error('SELECT * FROM distributed_table settings receive_timeout=5, send_timeout=5, use_hedged_requests=0, async_socket_for_remote=1;')
end = time.time()
assert end - start < 10
@ -73,7 +73,7 @@ def test(started_cluster):
assert error.find('DB::ReadBufferFromPocoSocket::nextImpl()') == -1
start = time.time()
error = NODES['node1'].query_and_get_error('SELECT * FROM distributed_table settings receive_timeout=5, send_timeout=5;')
error = NODES['node1'].query_and_get_error('SELECT * FROM distributed_table settings receive_timeout=5, send_timeout=5, use_hedged_requests=1, async_socket_for_remote=1;')
end = time.time()
assert end - start < 10