MCPcopy Create free account
hub / github.com/apache/impala / assert_kill_error

Function assert_kill_error

tests/util/cancel_util.py:84–91  ·  view source on GitHub ↗
(client, error_msg, query_id=None, sql=None, user=None)

Source from the content-addressed store, hash-verified

82
83
84def assert_kill_error(client, error_msg, query_id=None, sql=None, user=None):
85 if sql is None:
86 sql = "KILL QUERY '{0}'".format(query_id)
87 try:
88 client.execute(sql, user=user)
89 assert False, "Failed to catch the exception."
90 except Exception as exc:
91 assert error_msg_startswith(str(exc), error_msg)
92
93
94class FetchingThread(threading.Thread):

Callers 6

test_invalid_query_idMethod · 0.90
test_idempotenceMethod · 0.90
test_admit_no_queryMethod · 0.90

Calls 3

error_msg_startswithFunction · 0.90
formatMethod · 0.45
executeMethod · 0.45

Tested by 6

test_invalid_query_idMethod · 0.72
test_idempotenceMethod · 0.72
test_admit_no_queryMethod · 0.72