Skip to content

Commit

Permalink
Fix flaky test in query history (#2444)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-yuwang authored Oct 14, 2024
1 parent 7c22750 commit 2d61a4b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/integ/test_query_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ def test_query_history_without_multi_thread(session):
# assert it equals to main thread id
assert query.thread_id == threading.get_ident()
thread_numbers.add(query.thread_id)
print(query_history.queries)
assert len(thread_numbers) == 1


Expand All @@ -195,7 +194,7 @@ def test_query_history_with_multi_thread_and_describe(session):
_, _ = wait(works, return_when=ALL_COMPLETED)
thread_numbers = set()
for query in query_history.queries:
assert query.sql_text.split(" ")[-1] == str(query.thread_id)
if query.is_describe:
assert query.sql_text.split(" ")[-1] == str(query.thread_id)
thread_numbers.add(query.thread_id)
print(query_history.queries)
assert len(thread_numbers) == 2

0 comments on commit 2d61a4b

Please sign in to comment.