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

Method test_queries_closed

tests/shell/test_shell_commandline.py:588–602  ·  view source on GitHub ↗

Regression test for IMPALA-897.

(self, vector)

Source from the content-addressed store, hash-verified

586
587 @pytest.mark.execute_serially
588 def test_queries_closed(self, vector):
589 """Regression test for IMPALA-897."""
590 if vector.get_value('strict_hs2_protocol'):
591 pytest.skip("Strict hs2 mode does not support checking in flight queries.")
592 args = ['-f', '{0}/test_close_queries.sql'.format(QUERY_FILE_PATH), '--quiet', '-B']
593 # Execute the shell command async
594 p = ImpalaShell(vector, args)
595
596 impalad_service = ImpaladService(get_impalad_host_port(vector).split(':')[0])
597 # The last query in the test SQL script will sleep for 10 seconds, so sleep
598 # here for 5 seconds and verify the number of in-flight queries is 1.
599 sleep(5)
600 assert 1 == impalad_service.get_num_in_flight_queries()
601 assert p.get_result().rc == 0
602 assert impalad_service.wait_for_num_in_flight_queries(0)
603
604 def test_cancellation(self, vector):
605 """Test cancellation (Ctrl+C event). Run a query that sleeps 10ms per row so will run

Callers

nothing calls this directly

Calls 9

get_resultMethod · 0.95
ImpalaShellClass · 0.90
ImpaladServiceClass · 0.90
get_impalad_host_portFunction · 0.90
skipMethod · 0.80
get_valueMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected