You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by da...@apache.org on 2020/10/31 12:44:12 UTC

[kafka] branch trunk updated: MINOR: Fix group_mode_transactions_test (#9538)

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

dajac 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 ee1aa07  MINOR: Fix group_mode_transactions_test (#9538)
ee1aa07 is described below

commit ee1aa070367829e7670b6ca705398e82c6c6514e
Author: David Mao <47...@users.noreply.github.com>
AuthorDate: Sat Oct 31 07:43:13 2020 -0500

    MINOR: Fix group_mode_transactions_test (#9538)
    
    KIP-431 (#9099) changed the format of console consumer output to `Partition:$PARTITION\t$VALUE` whereas previously the output format was `$VALUE\t$PARTITION`. This PR updates the message verifier to accommodate the updated console consumer output format.
---
 tests/kafkatest/tests/core/group_mode_transactions_test.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/kafkatest/tests/core/group_mode_transactions_test.py b/tests/kafkatest/tests/core/group_mode_transactions_test.py
index 5763ada..141c613 100644
--- a/tests/kafkatest/tests/core/group_mode_transactions_test.py
+++ b/tests/kafkatest/tests/core/group_mode_transactions_test.py
@@ -153,8 +153,9 @@ class GroupModeTransactionsTest(Test):
         """
         try:
             splitted_msg = msg.split('\t')
-            tuple = [int(splitted_msg[0]), int(splitted_msg[1])]
-            return tuple
+            value = int(splitted_msg[1])
+            partition = int(splitted_msg[0].split(":")[1])
+            return [value, partition]
 
         except ValueError:
             raise Exception("Unexpected message format (expected a tab separated [value, partition] tuple). Message: %s" % (msg))