This is an automated email from the ASF dual-hosted git repository.

bhulette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 8a4093c21f3 [BEAM-14410] Add test to demonstrate BEAM-14410 issue in 
non-cython environments (#17548)
8a4093c21f3 is described below

commit 8a4093c21f3edb414be2d2ab2857d28d8a4e4b3e
Author: Brian Hulette <[email protected]>
AuthorDate: Tue May 31 10:21:47 2022 -0700

    [BEAM-14410] Add test to demonstrate BEAM-14410 issue in non-cython 
environments (#17548)
    
    * Add test to demonstrate BEAM-14410 in non-cython environments
    
    * lint
---
 .../runners/portability/fn_api_runner/fn_runner_test.py  | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git 
a/sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner_test.py 
b/sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner_test.py
index 3a8415e61b8..07b5486e9ba 100644
--- 
a/sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner_test.py
+++ 
b/sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner_test.py
@@ -293,6 +293,22 @@ class FnApiRunnerTest(unittest.TestCase):
                                  9*9                        # [ 9, 14)
                                  ]))
 
+  def test_pardo_large_input(self):
+    try:
+      utils.check_compiled('apache_beam.coders.coder_impl')
+    except RuntimeError:
+      self.skipTest(
+          'BEAM-14410: FnRunnerTest with non-trivial inputs flakes in '
+          'non-cython environments')
+    with self.create_pipeline() as p:
+      res = (
+          p
+          | beam.Create(np.array(range(5000),
+                                 dtype=np.int64)).with_output_types(np.int64)
+          | beam.Map(lambda e: e * 2)
+          | beam.Map(lambda e: e + 3))
+      assert_that(res, equal_to([(i * 2) + 3 for i in range(5000)]))
+
   def test_pardo_side_outputs(self):
     def tee(elem, *tags):
       for tag in tags:

Reply via email to