kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ij...@apache.org
Subject [kafka] branch trunk updated: MINOR: Fix failing ConsumeBenchTest:test_multiple_consumers_specified_group_partitions_should_raise (#6015)
Date Sat, 08 Dec 2018 17:28:13 GMT
This is an automated email from the ASF dual-hosted git repository.

ijuma pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 05dc36d  MINOR: Fix failing ConsumeBenchTest:test_multiple_consumers_specified_group_partitions_should_raise
(#6015)
05dc36d is described below

commit 05dc36d548fbe8e00dff51b19d698c980e7ecf0b
Author: Stanislav Kozlovski <stanislav_kozlovski@outlook.com>
AuthorDate: Sat Dec 8 17:27:59 2018 +0000

    MINOR: Fix failing ConsumeBenchTest:test_multiple_consumers_specified_group_partitions_should_raise
(#6015)
    
    This is the error message we're after:
    
    "You may not specify an explicit partition assignment when using multiple consumers in
the same group."
    
    We apparently changed it midway through #5810 and forgot to update the test.
    
    Reviewers: Dhruvil Shah <dhruvil@confluent.io>, Ismael Juma <ismael@juma.me.uk>
---
 tests/kafkatest/tests/core/consume_bench_test.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/kafkatest/tests/core/consume_bench_test.py b/tests/kafkatest/tests/core/consume_bench_test.py
index 641ec7c..e731270 100644
--- a/tests/kafkatest/tests/core/consume_bench_test.py
+++ b/tests/kafkatest/tests/core/consume_bench_test.py
@@ -177,10 +177,10 @@ class ConsumeBenchTest(Test):
 
     def test_multiple_consumers_specified_group_partitions_should_raise(self):
         """
-        Runs multiple consumers in to read messages from specific partitions.
-        Since a consumerGroup isn't specified, each consumer will get assigned a random group
-        and consume from all partitions
+        Runs multiple consumers in the same group to read messages from specific partitions.
+        It is an invalid configuration to provide a consumer group and specific partitions.
         """
+        expected_error_msg = 'explicit partition assignment'
         self.produce_messages(self.active_topics, max_messages=20000)
         consume_spec = ConsumeBenchWorkloadSpec(0, TaskSpec.MAX_DURATION_MS,
                                                 self.consumer_workload_service.consumer_node,
@@ -198,7 +198,7 @@ class ConsumeBenchTest(Test):
             consume_workload.wait_for_done(timeout_sec=360)
             raise Exception("Should have raised an exception due to an invalid configuration")
         except RuntimeError as e:
-            if 'Will not split partitions' not in str(e):
+            if expected_error_msg not in str(e):
                 raise RuntimeError("Unexpected Exception - " + str(e))
             self.logger.info(e)
 


Mime
View raw message