Fetches all rows using the given fetch_batches generator. Asserts that num_batches batches are produced by the generator and that num_rows are returned.
(self, fetch_batches, num_batches, num_rows)
| 80 | client.close_connection() |
| 81 | |
| 82 | def __fetch_rows(self, fetch_batches, num_batches, num_rows): |
| 83 | """Fetches all rows using the given fetch_batches generator. Asserts that num_batches |
| 84 | batches are produced by the generator and that num_rows are returned.""" |
| 85 | num_batches_count = 0 |
| 86 | rows_per_batch = num_rows // num_batches |
| 87 | for fetch_batch in fetch_batches: |
| 88 | assert len(fetch_batch) == rows_per_batch |
| 89 | num_batches_count += 1 |
| 90 | if num_batches_count == num_batches: break |
| 91 | assert num_batches_count == num_batches |
| 92 | |
| 93 | def __get_shell_client(self, vector, fetch_size=1024): |
| 94 | """Returns the client specified by the protocol in the given vector.""" |
no outgoing calls
no test coverage detected