damccorm opened a new pull request, #41206: URL: https://github.com/apache/beam/pull/41206
## Summary Fixes `AssertionError: Exception not raised` in `TestBigQueryFileLoads.test_one_load_job_failed_after_waiting` during `PreCommit Python` (run `42840054651`). ### Root Cause In `test_wait_for_load_job_completion` and `test_one_load_job_failed_after_waiting` (`sdks/python/apache_beam/io/gcp/bigquery_file_loads_test.py`), `beam.Create([partition_1, partition_2])` defaulted to `reshuffle=True`. When `DirectRunner` splits the two elements across two bundles after `Reshuffle`, `TriggerLoadJobs(test_client=bq_client)` is pickled and unpickled per bundle, giving each bundle an independent copy of the stateful `bq_client` mock whose `side_effect` iterators start from index `0`. Consequently, neither bundle ever reaches index `2` (`job_1_error`) in `bq_client.jobs.Get.side_effect = [job_1_waiting, job_2_done, job_1_error, job_2_done]`. ### Changes - Pass `reshuffle=False` to `beam.Create([partition_1, partition_2], reshuffle=False)` in `test_wait_for_load_job_completion` and `test_one_load_job_failed_after_waiting`, matching the other mock-based tests in `TestBigQueryFileLoads`. ### Verification - Triggered `beam_PreCommit_Python.yml` workflow run on branch: [`43020064975`](https://github.com/apache/beam/actions/runs/43020064975) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
