diff options
author | Ravishankar N <ravishankar@redhat.com> | 2019-09-04 11:27:30 +0530 |
---|---|---|
committer | Ravishankar N <ravishankar@redhat.com> | 2019-09-05 04:02:18 +0000 |
commit | 86ac340dd9c79c46a0d79ec2b5680a7b3acc301f (patch) | |
tree | 4554a85ee714b7ce14c6fb912fc5d4a13aa32182 | |
parent | 4ca8dd7e24b40a156c7f4ba41f1d7da91ac21d84 (diff) |
tests: fix spurious failure of bug-1402841.t-mt-dir-scan-race.t
Problem:
Since commit 600ba94183333c4af9b4a09616690994fd528478, shd starts
healing as soon as it is toggled from disabled to enabled. This was
causing the following line in the .t to fail on a 'fast' machine (always
on my laptop and sometimes on the jenkins slaves).
EXPECT_NOT "^0$" get_pending_heal_count $V0
because by the time shd was disabled, the heal was already completed.
Fix:
Increase the no. of files to be healed and make it a variable called
FILE_COUNT, should we need to bump it up further because the machines
become even faster. Also created pending metadata heals to increase the
time taken to heal a file.
fixes: bz#1749157
Change-Id: I5a26b08e45b8c19bce3c01ce67bdcc28ed48198d
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
(cherry picked from commit 724c657995a2e148243eeb78c68b620c6d7714a5)
-rwxr-xr-x | tests/bugs/core/bug-1402841.t-mt-dir-scan-race.t | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/bugs/core/bug-1402841.t-mt-dir-scan-race.t b/tests/bugs/core/bug-1402841.t-mt-dir-scan-race.t index 6351ba22511..a1b9a851bf7 100755 --- a/tests/bugs/core/bug-1402841.t-mt-dir-scan-race.t +++ b/tests/bugs/core/bug-1402841.t-mt-dir-scan-race.t @@ -3,6 +3,8 @@ . $(dirname $0)/../../volume.rc cleanup; +FILE_COUNT=500 + TEST glusterd TEST pidof glusterd TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{0,1} @@ -11,15 +13,14 @@ TEST $CLI volume set $V0 cluster.shd-wait-qlength 100 TEST $CLI volume start $V0 TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 $M0; -touch $M0/file{1..200} - +for i in `seq 1 $FILE_COUNT`; do touch $M0/file$i; done TEST kill_brick $V0 $H0 $B0/${V0}1 -for i in {1..200}; do echo hello>$M0/file$i; done +for i in `seq 1 $FILE_COUNT`; do echo hello>$M0/file$i; chmod -x $M0/file$i; done TEST $CLI volume start $V0 force EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" brick_up_status $V0 $H0 $B0/${V0}1 EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" afr_child_up_status $V0 1 -EXPECT "200" get_pending_heal_count $V0 +EXPECT "$FILE_COUNT" get_pending_heal_count $V0 TEST $CLI volume set $V0 self-heal-daemon on EXPECT_WITHIN $PROCESS_UP_TIMEOUT "Y" glustershd_up_status |