Skip to content

Commit e90b315

Browse files
authored
fix(e2e): fix automq_zerozone_test iftop command permission (#3231)
Signed-off-by: Robin Han <hanxvdovehx@gmail.com>
1 parent b23960f commit e90b315

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/kafkatest/automq/automq_zerozone_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ def _assert_only_node1_traffic(self, node, label):
122122
node1_ip = broker_ips[0]
123123
other_broker_ips = set(broker_ips[1:])
124124

125-
cmd = "iftop -t -s 10 -L 10 -n"
125+
# The runner user may not have permissions to run iftop, so we run it as root.
126+
cmd = "sudo -u root iftop -t -s 10 -L 10 -n"
126127
iftop_output = [line for line in node.account.ssh_capture(cmd, allow_fail=False)]
127128
# The consumer still has some traffic to coordinator, so we set the threshold to 4096
128129
seen_ips = parse_iftop_ips(iftop_output, min_bps_bytes=4096)

0 commit comments

Comments
 (0)