mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Merge pull request #63720 from Avogar/better-s3-seekable-formats-tests
Try to fix flaky s3 tests test_seekable_formats and test_seekable_formats_url
This commit is contained in:
commit
9c7c607cd5
@ -139,12 +139,18 @@ def assert_logs_contain_with_retry(instance, substring, retry_count=20, sleep_ti
|
||||
|
||||
|
||||
def exec_query_with_retry(
|
||||
instance, query, retry_count=40, sleep_time=0.5, silent=False, settings={}
|
||||
instance,
|
||||
query,
|
||||
retry_count=40,
|
||||
sleep_time=0.5,
|
||||
silent=False,
|
||||
settings={},
|
||||
timeout=30,
|
||||
):
|
||||
exception = None
|
||||
for cnt in range(retry_count):
|
||||
try:
|
||||
res = instance.query(query, timeout=30, settings=settings)
|
||||
res = instance.query(query, timeout=timeout, settings=settings)
|
||||
if not silent:
|
||||
logging.debug(f"Result of {query} on {cnt} try is {res}")
|
||||
break
|
||||
|
@ -1133,6 +1133,7 @@ def test_seekable_formats(started_cluster):
|
||||
exec_query_with_retry(
|
||||
instance,
|
||||
f"insert into table function {table_function} SELECT number, randomString(100) FROM numbers(1000000) settings s3_truncate_on_insert=1",
|
||||
timeout=100,
|
||||
)
|
||||
|
||||
result = instance.query(f"SELECT count() FROM {table_function}")
|
||||
@ -1142,6 +1143,7 @@ def test_seekable_formats(started_cluster):
|
||||
exec_query_with_retry(
|
||||
instance,
|
||||
f"insert into table function {table_function} SELECT number, randomString(100) FROM numbers(1500000) settings s3_truncate_on_insert=1",
|
||||
timeout=100,
|
||||
)
|
||||
|
||||
result = instance.query(
|
||||
@ -1169,6 +1171,7 @@ def test_seekable_formats_url(started_cluster):
|
||||
exec_query_with_retry(
|
||||
instance,
|
||||
f"insert into table function {table_function} SELECT number, randomString(100) FROM numbers(1500000) settings s3_truncate_on_insert=1",
|
||||
timeout=100,
|
||||
)
|
||||
|
||||
result = instance.query(f"SELECT count() FROM {table_function}")
|
||||
@ -1178,6 +1181,7 @@ def test_seekable_formats_url(started_cluster):
|
||||
exec_query_with_retry(
|
||||
instance,
|
||||
f"insert into table function {table_function} SELECT number, randomString(100) FROM numbers(1500000) settings s3_truncate_on_insert=1",
|
||||
timeout=100,
|
||||
)
|
||||
|
||||
table_function = f"url('http://{started_cluster.minio_host}:{started_cluster.minio_port}/{bucket}/test_parquet', 'Parquet', 'a Int32, b String')"
|
||||
|
Loading…
Reference in New Issue
Block a user