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

Method __test_fetch_no_timeout

tests/hs2/test_fetch_timeout.py:206–220  ·  view source on GitHub ↗

Tests setting FETCH_ROWS_TIMEOUT_MS to 0, and validates that fetch requests wait indefinitely when the timeout is 0.

(self)

Source from the content-addressed store, hash-verified

204 self.__test_fetch_no_timeout()
205
206 def __test_fetch_no_timeout(self):
207 """Tests setting FETCH_ROWS_TIMEOUT_MS to 0, and validates that fetch requests wait
208 indefinitely when the timeout is 0."""
209 num_rows = 10
210 statement = "select * from functional.alltypes limit {0}".format(num_rows)
211 execute_statement_resp = self.execute_statement(statement,
212 conf_overlay={'debug_action': 'CRS_BEFORE_COORD_STARTS:SLEEP@5000',
213 'fetch_rows_timeout_ms': '0'})
214 HS2TestSuite.check_response(execute_statement_resp)
215
216 # Assert that the first fetch request returns 0 rows.
217 fetch_results_resp = self.hs2_client.FetchResults(TCLIService.TFetchResultsReq(
218 operationHandle=execute_statement_resp.operationHandle, maxRows=1024))
219 HS2TestSuite.check_response(fetch_results_resp)
220 assert self.get_num_rows(fetch_results_resp.results) == num_rows
221
222
223class TestFetchTimeoutWithResultSpooling(HS2TestSuite):

Calls 5

execute_statementMethod · 0.80
check_responseMethod · 0.80
get_num_rowsMethod · 0.80
formatMethod · 0.45
FetchResultsMethod · 0.45

Tested by

no test coverage detected