Merge pull request #40424 from azat/tests/test_storage_s3

tests: fix test_storage_s3::test_wrong_format_usage flakiness
This commit is contained in:
Kruglov Pavel 2022-08-22 12:24:38 +02:00 committed by GitHub
commit c5c6f8a3fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1478,11 +1478,13 @@ def test_wrong_format_usage(started_cluster):
instance = started_cluster.instances["dummy"]
instance.query(
f"insert into function s3('http://{started_cluster.minio_host}:{started_cluster.minio_port}/{bucket}/test_wrong_format.native') select * from numbers(10)"
f"insert into function s3('http://{started_cluster.minio_host}:{started_cluster.minio_port}/{bucket}/test_wrong_format.native') select * from numbers(10e6)"
)
# size(test_wrong_format.native) = 10e6*8+16(header) ~= 76MiB
# ensure that not all file will be loaded into memory
result = instance.query_and_get_error(
f"desc s3('http://{started_cluster.minio_host}:{started_cluster.minio_port}/{bucket}/test_wrong_format.native', 'Parquet') settings input_format_allow_seeks=0, max_memory_usage=1000"
f"desc s3('http://{started_cluster.minio_host}:{started_cluster.minio_port}/{bucket}/test_wrong_format.native', 'Parquet') settings input_format_allow_seeks=0, max_memory_usage='10Mi'"
)
assert "Not a Parquet file" in result