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

Add proceed_on_failure parameter to allow retry #20650

Merged
merged 1 commit into from
Nov 15, 2024
Merged
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
4 changes: 2 additions & 2 deletions lib/utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ sub set_hostname {
systemctl('restart NetworkManager');

for (my $i = 0; $i < 10; $i++) {
$state = script_output 'nmcli -w 5 networking connectivity check';
$state = script_output("nmcli -w 5 networking connectivity check", proceed_on_failure => 1);
last if $state =~ /full/;
sleep 1;
}
Expand Down Expand Up @@ -1209,7 +1209,7 @@ sub set_hostname {
}

for (my $i = 0; $i < 5; $i++) {
$state = script_output 'nmcli -w 5 networking connectivity check';
$state = script_output("nmcli -w 5 networking connectivity check", proceed_on_failure => 1);

last if $state =~ /full/;

Expand Down
3 changes: 2 additions & 1 deletion tests/microos/networkmanager.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ sub ping_check {
assert_script_run("ping -c 5 $net_config{'dns_server'}");
# disconnect the device, skip the test on remote worker with ssh connection
unless (is_s390x || is_vmware) {
assert_script_run("nmcli device disconnect $nic_name");
# Increase timeout to 60s - poo#169726
assert_script_run("nmcli -w 60 device disconnect $nic_name");
if (script_run("ping -c 5 $net_config{'dns_server'}") == 0) {
die('The network is still up after disconnection');
}
Expand Down
Loading