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 retries on autofs client to sync data with server #17314

Merged
merged 1 commit into from
Jun 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/network/autofs_client.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SUSE's openQA tests
#
# Copyright 2019-2021 SUSE LLC
# Copyright 2019-2023 SUSE LLC
# SPDX-License-Identifier: FSFAP

# Package: autofs nfs-client
Expand Down Expand Up @@ -38,7 +38,7 @@ use base 'consoletest';
use testapi;
use lockapi;
use autofs_utils qw(setup_autofs_server check_autofs_service);
use utils 'systemctl';
use utils qw(systemctl script_retry);
use version_utils 'is_opensuse';
use strict;
use warnings;
Expand Down Expand Up @@ -70,11 +70,11 @@ sub run {
assert_script_run("nfsidmap -c || true");
assert_script_run("mkdir -p $test_mount_dir_nfsidmap");

mutex_wait 'barrier_setup_done';
barrier_wait 'AUTOFS_SUITE_READY';

# autofs
assert_script_run("ls $test_mount_dir/test");
# Due to poo#131291, we can add retries on client to sync the data from server
script_retry("ls $test_mount_dir/test", delay => 10, retry => 3);
assert_script_run("mount | grep -e $test_mount_dir/test");
validate_script_output("cat $test_mount_dir/test/file.txt", sub { m/It worked/ }, 200);

Expand Down