You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/10/17 00:52:07 UTC

[GitHub] [beam] ihji commented on a change in pull request #15690: [BEAM-12769] Adds integration tests for Java Class Lookup based cross-language expansion

ihji commented on a change in pull request #15690:
URL: https://github.com/apache/beam/pull/15690#discussion_r730016165



##########
File path: sdks/python/apache_beam/io/external/generate_sequence_test.py
##########
@@ -47,13 +50,54 @@ def test_generate_sequence(self):
             p
             | GenerateSequence(start=1, stop=10, expansion_service=address))
 
-        assert_that(res, equal_to([i for i in range(1, 10)]))
+        assert_that(res, equal_to(list(range(1, 10))))
     except RuntimeError as e:
       if re.search(GenerateSequence.URN, str(e)):
         print("looks like URN not implemented in expansion service, skipping.")
       else:
         raise e
 
+  # Using "!= 'Python'" instead of "== 'Java'" below to make sure that the test
+  # is not silently ignored if configs change the EXPANSION_SERVICE_TYPE "Java".
+  @unittest.skipUnless(
+      os.environ.get('EXPANSION_SERVICE_TYPE') != 'Python',
+      'Java Class Lookup based expansion is not supported by the Python '
+      'expansion service')
+  def test_generate_sequence_java_class_lookup_payload_builder(self):

Review comment:
       Oh, okay. The class is annotated instead. Thanks for the clarification.




-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org