You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by js...@apache.org on 2022/10/02 02:26:26 UTC

[kafka] branch 3.3 updated: MINOR: Fix delegation token system test (#12693)

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

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


The following commit(s) were added to refs/heads/3.3 by this push:
     new c2d7984c8e MINOR: Fix delegation token system test (#12693)
c2d7984c8e is described below

commit c2d7984c8e5a26f6a970ebe5a6c57d9e9a83f6ef
Author: David Arthur <mu...@gmail.com>
AuthorDate: Sat Oct 1 22:22:46 2022 -0400

    MINOR: Fix delegation token system test (#12693)
    
    KIP-373 added a "token requester" field to the output of kafka-delegation-tokens.sh. The system test was failing since it was not expecting this new field. This patch adds support for this field and improves the error output if we can't parse.
    
    Reviewers: José Armando García Sancio <js...@apache.org>, Manikumar Reddy <ma...@gmail.com>
---
 tests/kafkatest/services/delegation_tokens.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tests/kafkatest/services/delegation_tokens.py b/tests/kafkatest/services/delegation_tokens.py
index 34da16bcab..684b1a5df0 100644
--- a/tests/kafkatest/services/delegation_tokens.py
+++ b/tests/kafkatest/services/delegation_tokens.py
@@ -92,10 +92,16 @@ KafkaClient {
         for line in output_iter:
             output += line
 
-        tokenid, hmac, owner, renewers, issuedate, expirydate, maxdate = output.split()
+        parts = output.split()
+        try:
+            tokenid, hmac, owner, requester, renewers, issuedate, expirydate, maxdate = parts
+        except ValueError:
+            raise ValueError("Could not parse %s, got parts %s" % (output, parts))
+
         return {"tokenid" : tokenid,
                 "hmac" : hmac,
                 "owner" : owner,
+                "requester": requester,
                 "renewers" : renewers,
                 "issuedate" : issuedate,
                 "expirydate" :expirydate,