You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by tv...@apache.org on 2022/05/24 19:29:03 UTC

[beam] branch master updated: [BEAM-12308] change expected value in kakfa IT (#17740)

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

tvalentyn 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 bb8dafb0ecf [BEAM-12308] change expected value in kakfa IT (#17740)
bb8dafb0ecf is described below

commit bb8dafb0ecf4643a4c7fa7b28d8fb6ccdc297257
Author: johnjcasey <95...@users.noreply.github.com>
AuthorDate: Tue May 24 15:28:52 2022 -0400

    [BEAM-12308] change expected value in kakfa IT (#17740)
---
 sdks/python/apache_beam/io/external/xlang_kafkaio_it_test.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/sdks/python/apache_beam/io/external/xlang_kafkaio_it_test.py b/sdks/python/apache_beam/io/external/xlang_kafkaio_it_test.py
index 39a83d6b694..edeb76aa0e7 100644
--- a/sdks/python/apache_beam/io/external/xlang_kafkaio_it_test.py
+++ b/sdks/python/apache_beam/io/external/xlang_kafkaio_it_test.py
@@ -124,7 +124,7 @@ class CrossLanguageKafkaIOTest(unittest.TestCase):
           bootstrap_servers, kafka_topic, False)
 
       self.run_kafka_write(pipeline_creator)
-      self.run_kafka_read(pipeline_creator)
+      self.run_kafka_read(pipeline_creator, b'key')
 
   def test_kafkaio_null_key(self):
     kafka_topic = 'xlang_kafkaio_test_null_key_{}'.format(uuid.uuid4())
@@ -136,20 +136,21 @@ class CrossLanguageKafkaIOTest(unittest.TestCase):
           bootstrap_servers, kafka_topic, True)
 
       self.run_kafka_write(pipeline_creator)
-      self.run_kafka_read(pipeline_creator)
+      self.run_kafka_read(pipeline_creator, None)
 
   def run_kafka_write(self, pipeline_creator):
     with TestPipeline() as pipeline:
       pipeline.not_use_test_runner_api = True
       pipeline_creator.build_write_pipeline(pipeline)
 
-  def run_kafka_read(self, pipeline_creator):
+  def run_kafka_read(self, pipeline_creator, expected_key):
     with TestPipeline() as pipeline:
       pipeline.not_use_test_runner_api = True
       result = pipeline_creator.build_read_pipeline(pipeline, NUM_RECORDS)
       assert_that(
           result,
-          equal_to([(b'', str(i).encode()) for i in range(NUM_RECORDS)]))
+          equal_to([(expected_key, str(i).encode())
+                    for i in range(NUM_RECORDS)]))
 
   def get_platform_localhost(self):
     if sys.platform == 'darwin':