Skip to content

Commit

Permalink
Add retry for hostname test
Browse files Browse the repository at this point in the history
  • Loading branch information
cedvid committed Nov 14, 2024
1 parent 844b65d commit b41f8c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ sub set_hostname {
next if !($line =~ /connected/);

# Default timeout (10 seconds) may be too short with qemu NO kvm, so increase to 20s - poo#131366
my $nmcli = get_var('QEMU_NO_KVM') ? 'nmcli -w 40' : 'nmcli';
my $nmcli = get_var('QEMU_NO_KVM') ? 'nmcli -w 20' : 'nmcli';
assert_script_run "$nmcli device disconnect $dev";
assert_script_run 'nmcli device connect ' . $dev;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/console/hostname.pm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ sub run {
file_content_replace('/etc/sysconfig/network/dhcp', 'DHCLIENT_SET_HOSTNAME="yes"' => 'DHCLIENT_SET_HOSTNAME="no"');
}

set_hostname(get_var('HOSTNAME', 'susetest'));
script_retry("set_hostname(get_var('HOSTNAME', 'susetest'))", delay => 40, retry => 5);
}

sub test_flags {
Expand Down

0 comments on commit b41f8c7

Please sign in to comment.