Regression test for IMPALA-897.
(self, vector)
| 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 |
nothing calls this directly
no test coverage detected