mirror of
https://github.com/apache/impala.git
synced 2025-12-19 18:12:08 -05:00
IMPALA-14602: Fix Flaky OTel Test
Tests in test_otel_trace.py that rely on queries being queued assume a first long-running query will be started before a second query. These tests are flaky most likely because the first long running query is executed asynchronously immediately followed by executing a second query. During slower builds (such as ASAN), the first query may not be in running state before the second query is started. This patch adds a check on the first query to ensure it is running before starting the second query. Change-Id: I9e77ec70b4668f0daed2ab9411f8f6c52ddccb2a Reviewed-on: http://gerrit.cloudera.org:8080/23743 Reviewed-by: Riza Suminto <riza.suminto@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
This commit is contained in:
committed by
Impala Public Jenkins
parent
bff814f079
commit
f8d21f34bc
@@ -495,8 +495,9 @@ class TestOtelTraceSelectQueued(TestOtelTraceBase):
|
||||
"""Tests that a query that is queued in admission control can be cancelled and
|
||||
the trace is created with the expected spans and events."""
|
||||
# Start a long-running query that will take up the only admission control slot.
|
||||
self.client.execute_async("SELECT * FROM functional.alltypes WHERE id = "
|
||||
handle1 = self.client.execute_async("SELECT * FROM functional.alltypes WHERE id = "
|
||||
"SLEEP(5000)")
|
||||
self.client.wait_for_impala_state(handle1, RUNNING, 60)
|
||||
|
||||
# Start a second query that will be queued and then cancelled.
|
||||
handle2 = self.client.execute_async("SELECT * FROM functional.alltypes")
|
||||
|
||||
Reference in New Issue
Block a user