| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -35,6 +35,7 @@ | |||
| 35 | 35 | from test_utils.system import unique_resource_id | |
| 36 | 36 | ||
| 37 | 37 | ||
| 38 | + JOB_TIMEOUT = 120 # 2 minutes | ||
| 38 | 39 | WHERE = os.path.abspath(os.path.dirname(__file__)) | |
| 39 | 40 | ||
| 40 | 41 | ||
@@ -381,9 +382,7 @@ def test_load_table_from_local_file_then_dump_table(self): | |||
| 381 | 382 | ) | |
| 382 | 383 | ||
| 383 | 384 | # Retry until done. | |
| 384 | - job.result() | ||
| 385 | - retry = RetryInstanceState(_job_done, max_tries=8) | ||
| 386 | - retry(job.reload)() | ||
| 385 | + job.result(timeout=JOB_TIMEOUT) | ||
| 387 | 386 | ||
| 388 | 387 | self.assertEqual(job.output_rows, len(ROWS)) | |
| 389 | 388 | ||
@@ -420,9 +419,7 @@ def test_load_table_from_local_avro_file_then_dump_table(self): | |||
| 420 | 419 | ) | |
| 421 | 420 | ||
| 422 | 421 | # Retry until done. | |
| 423 | - job.result() | ||
| 424 | - retry = RetryInstanceState(_job_done, max_tries=8) | ||
| 425 | - retry(job.reload)() | ||
| 422 | + job.result(timeout=JOB_TIMEOUT) | ||
| 426 | 423 | ||
| 427 | 424 | self.assertEqual(job.output_rows, len(ROWS)) | |
| 428 | 425 | ||
@@ -772,9 +769,7 @@ def _load_table_for_dml(self, rows, dataset_name, table_name): | |||
| 772 | 769 | ) | |
| 773 | 770 | ||
| 774 | 771 | # Retry until done. | |
| 775 | - job.result() | ||
| 776 | - retry = RetryInstanceState(_job_done, max_tries=8) | ||
| 777 | - retry(job.reload)() | ||
| 772 | + job.result(timeout=JOB_TIMEOUT) | ||
| 778 | 773 | self._fetch_single_page(table) | |
| 779 | 774 | ||
| 780 | 775 | def test_sync_query_w_dml(self): | |
@@ -1091,7 +1086,7 @@ def test_async_query_future(self): | |||
| 1091 | 1086 | str(uuid.uuid4()), 'SELECT 1') | |
| 1092 | 1087 | query_job.use_legacy_sql = False | |
| 1093 | 1088 | ||
| 1094 | - iterator = query_job.result().fetch_data() | ||
| 1089 | + iterator = query_job.result(timeout=JOB_TIMEOUT).fetch_data() | ||
| 1095 | 1090 | rows = list(iterator) | |
| 1096 | 1091 | self.assertEqual(rows, [(1,)]) | |
| 1097 | 1092 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments