Skip to content

Commit

Permalink
tests: Fix for spurious failure for some test cases
Browse files Browse the repository at this point in the history
Problem: Sometimes test case is failing at the time of creating files
         on mount point after mounting the volume

Solution: After started the volume need to wait to make sure all
          bricks instances are completely started so put a online_brick_count
          check after just started the volume

Change-Id: I5020e7e417539377277ca00189f9c51d2cf877a6
Fixes: gluster#1162
Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
  • Loading branch information
Mohit Agrawal authored and gluster-ant committed Apr 10, 2020
1 parent dd7c018 commit 4eb2885
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/bugs/bug-1371806.t
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ TEST glusterd
TEST pidof glusterd
TEST $CLI volume create $V0 $H0:$B0/${V0}{0,1,2,3,4,5}
TEST $CLI volume start $V0
EXPECT_WITHIN ${PROCESS_UP_TIMEOUT} "6" online_brick_count

TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 --entry-timeout=0 $M0;

Expand Down
1 change: 1 addition & 0 deletions tests/bugs/bug-1371806_acl.t
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ TEST pidof glusterd
TEST $CLI volume create $V0 $H0:$B0/${V0}{0,1,2,3,4,5}
TEST $CLI volume set $V0 diagnostics.client-log-level DEBUG
TEST $CLI volume start $V0
EXPECT_WITHIN ${PROCESS_UP_TIMEOUT} "6" online_brick_count

TEST glusterfs --volfile-id=$V0 --acl --volfile-server=$H0 --entry-timeout=0 $M0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
#Create a 3x3 dist-rep volume
TEST $CLI volume create $V1 replica 3 $H0:$B0/${V1}{0,1,2,3,4,5,6,7,8};
TEST $CLI volume start $V1
EXPECT_WITHIN ${PROCESS_UP_TIMEOUT} "9" brick_count ${V1}

# Mount FUSE and create file/directory
TEST glusterfs -s $H0 --volfile-id $V1 $M0
Expand Down
3 changes: 2 additions & 1 deletion tests/bugs/snapshot/bug-1597662.t
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ function is_snap_path
EXPECT "1" is_snap_path

$CLI snapshot deactivate snap1;

EXPECT_WITHIN ${PROCESS_DOWN_TIMEOUT} 'Stopped' snapshot_status snap1
# snap is deactivated so snap_path should not exist
EXPECT "0" is_snap_path

# activate snap again
$CLI snapshot activate snap1;
EXPECT_WITHIN ${PROCESS_UP_TIMEOUT} 'Started' snapshot_status snap1

# snap is active so snap_path should exist
EXPECT "1" is_snap_path
Expand Down
1 change: 1 addition & 0 deletions tests/features/fuse-lru-limit.t
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ TEST pidof glusterd
TEST $CLI volume create $V0 $H0:$B0/${V0}{0,1}
TEST $CLI volume start $V0
TEST glusterfs -s $H0 --volfile-id $V0 $M0
EXPECT_WITHIN ${PROCESS_UP_TIMEOUT} "2" online_brick_count

EXPECT "1" get_mount_active_size_value $V0 $M0
EXPECT "0" get_mount_lru_size_value $V0 $M0
Expand Down

0 comments on commit 4eb2885

Please sign in to comment.