jh1231223 commented on code in PR #36485:
URL: https://github.com/apache/beam/pull/36485#discussion_r2431092648


##########
sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner_test.py:
##########
@@ -112,9 +138,10 @@ def create_pipeline(self, is_drain=False):
   def test_assert_that(self):
     # TODO: figure out a way for fn_api_runner to parse and raise the
     # underlying exception.
-    with self.assertRaisesRegex(Exception, 'Failed assert'):
-      with self.create_pipeline() as p:
-        assert_that(p | beam.Create(['a', 'b']), equal_to(['a']))
+    with patch_portable_runner_for_test():  # pylint: 
disable=not-context-manager

Review Comment:
   Totally agree that the issue isn't the test.
   
   I changed PortableRunner.wait_until_finish() so it re-raises worker errors 
instead of just logging them on the message stream. Before, failures could get 
buried in logs and the timing made the run look “successful” sometimes, which 
caused the flake. Now the error bubbles up, the job fails deterministically, 
and the test passes without any test changes. 
   
   The changes are in portable_runner.py, plus a tiny companion tweak in 
local_job_service.py.



-- 
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]

Reply via email to