diff --git a/lib/utils.pm b/lib/utils.pm index 65c379aee967..a61a961ec2bd 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -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; } @@ -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/; diff --git a/tests/microos/networkmanager.pm b/tests/microos/networkmanager.pm index 420d36d70d81..df056e6713df 100644 --- a/tests/microos/networkmanager.pm +++ b/tests/microos/networkmanager.pm @@ -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'); }