mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Merge pull request #40575 from Avogar/try-fix-s3-test
Fix flaky schema inference cache tests
This commit is contained in:
commit
f68db41c1c
@ -27,7 +27,7 @@ def get_profile_event_for_query(node, query, profile_event):
|
||||
query = query.replace("'", "\\'")
|
||||
return int(
|
||||
node.query(
|
||||
f"select ProfileEvents['{profile_event}'] from system.query_log where query='{query}' and type = 'QueryFinish' order by event_time desc limit 1"
|
||||
f"select ProfileEvents['{profile_event}'] from system.query_log where query='{query}' and type = 'QueryFinish' order by query_start_time_microseconds desc limit 1"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -636,7 +636,7 @@ def get_profile_event_for_query(node, query, profile_event):
|
||||
query = query.replace("'", "\\'")
|
||||
return int(
|
||||
node.query(
|
||||
f"select ProfileEvents['{profile_event}'] from system.query_log where query='{query}' and type = 'QueryFinish' order by event_time desc limit 1"
|
||||
f"select ProfileEvents['{profile_event}'] from system.query_log where query='{query}' and type = 'QueryFinish' order by query_start_time_microseconds desc limit 1"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -1493,16 +1493,12 @@ def test_wrong_format_usage(started_cluster):
|
||||
def check_profile_event_for_query(instance, query, profile_event, amount):
|
||||
instance.query("system flush logs")
|
||||
query = query.replace("'", "\\'")
|
||||
attempt = 0
|
||||
res = 0
|
||||
while attempt < 10:
|
||||
res = int(
|
||||
instance.query(
|
||||
f"select ProfileEvents['{profile_event}'] from system.query_log where query='{query}' and type = 'QueryFinish' order by event_time desc limit 1"
|
||||
)
|
||||
res = int(
|
||||
instance.query(
|
||||
f"select ProfileEvents['{profile_event}'] from system.query_log where query='{query}' and type = 'QueryFinish' order by query_start_time_microseconds desc limit 1"
|
||||
)
|
||||
if res == amount:
|
||||
break
|
||||
)
|
||||
|
||||
assert res == amount
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user