Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ducktape: Respect rpk timeout in rpk #24642

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions tests/rptest/clients/rpk.py
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,7 @@ def _execute(self, cmd, stdin=None, timeout=None, log_cmd=True, env=None):
if timeout is None:
timeout = DEFAULT_TIMEOUT

cmd += ['-X', f'globals.request_timeout_overhead={timeout}s']
# Unconditionally enable verbose logging
cmd += ['-v']

Expand Down Expand Up @@ -1301,7 +1302,7 @@ def _kafka_conn_settings(self, node: Optional[ClusterNode] = None):
flags += self._tls_settings()
return flags

def acl_list(self, flags: list[str] = [], request_timeout_overhead=None):
def acl_list(self, flags: list[str] = []):
"""
Run `rpk acl list` and return the results.

Expand All @@ -1318,13 +1319,6 @@ def acl_list(self, flags: list[str] = [], request_timeout_overhead=None):
"list",
] + flags + self._kafka_conn_settings()

# How long rpk will wait for a response from the broker, default is 5s
if request_timeout_overhead is not None:
cmd += [
"-X", "globals.request_timeout_overhead=" +
f'{str(request_timeout_overhead)}s'
]

output = self._execute(cmd)

if "CLUSTER_AUTHORIZATION_FAILED" in output:
Expand Down
3 changes: 1 addition & 2 deletions tests/rptest/tests/rpk_acl_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ def test_modify_then_query_error(self):
FailureSpec(FailureSpec.FAILURE_ISOLATE,
self.redpanda.controller()))

# Timeout must be larger then hardcoded timeout of 5s within redpanda
_ = superclient.acl_list(request_timeout_overhead=30)
_ = superclient.acl_list()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this set this test back to 5s timeout, which may cause it to fail?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I.e., don't we need to set timeout on the rpk object to 30s now in this test.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No not really because the default timeout is 30s anyway and the request_timeout_overhead thing now effectively applies to everything so the special casing in acl_list isn't needed anymore.


# Of the other remaining nodes, none can be declared a leader before
# the election timeout occurs; also the "current" leader is technically
Expand Down
Loading