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


##########
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:
   Thanks - this is a good find.
   
   With that said, I think that fixing the test is probably the wrong move 
here. If this test is flaky, it indicates that the underlying runner is not 
doing the right thing (the runner _should_ fail this test everytime without any 
patches). So I think we need to address the behavior on the underlying runner, 
not in the test.



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