Skip to content

Commit 178344c

Browse files
yangchiumergify[bot]
authored andcommitted
test(robot): fix test case Test Node ID Change During Backing Image Creation failure caused by execute_command exception
Signed-off-by: Yang Chiu <yang.chiu@suse.com> (cherry picked from commit 62fb430)
1 parent 096d894 commit 178344c

2 files changed

Lines changed: 1 addition & 10 deletions

File tree

e2e/keywords/longhorn.resource

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ Delete Longhorn node ${node_id}
243243
execute_command
244244
... kubectl taint node ${node_name} node-role.kubernetes.io/worker=true:NoExecute
245245
wait_for_longhorn_node_down ${node_name}
246-
execute_command_until_success
246+
execute_command_and_wait_for_output
247247
... kubectl -n longhorn-system delete nodes.longhorn.io ${node_name}
248248
... node.longhorn.io "${node_name}" deleted
249249

e2e/libs/keywords/common_keywords.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,6 @@ def execute_command_and_expect_output(self, cmd, expected_output):
7171
time.sleep(retry_count)
7272
assert False, f"Failed to find {expected_output} in {cmd} result: {res}"
7373

74-
def execute_command_until_success(self, cmd, expected_output):
75-
retry_count, retry_interval = get_retry_count_and_interval()
76-
for _ in range(retry_count):
77-
res = subprocess_exec_cmd(cmd)
78-
if expected_output in res:
79-
return res
80-
time.sleep(retry_interval)
81-
assert False, f"'{expected_output}' not found in command result: {res}"
82-
8374
def execute_command_and_wait_for_output(self, cmd, output):
8475
retry_count, retry_interval = get_retry_count_and_interval()
8576
for i in range(retry_count):

0 commit comments

Comments
 (0)