Tests setting FETCH_ROWS_TIMEOUT_MS to 0, and validates that fetch requests wait indefinitely when the timeout is 0.
(self)
| 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 | |
| 223 | class TestFetchTimeoutWithResultSpooling(HS2TestSuite): |
no test coverage detected