diff options
author | vmallika <vmallika@redhat.com> | 2015-07-10 14:37:50 +0530 |
---|---|---|
committer | Krishnan Parthasarathi <kparthas@redhat.com> | 2015-07-12 21:34:53 -0700 |
commit | 46d4d7ade012f86044135dd4af3101f851484cda (patch) | |
tree | e5308db8044e62788e0bde1f21ed54a904af40fe /tests/bugs/quota/bug-1178130.t | |
parent | 2e44d1580497eb75f325ad3104249a425ddf592a (diff) |
features/quota : Fix spurious failure
Problem : Basically, in this test case a file is created
which exceeds the quota limit. Once the limit is reached
that file will be deleted. At the same moment we are
testing inode-quota. It can so happen that before the
marker updates the information related to deletion of
file, a new file creation operation comes and sees that
quota limit is still exceeded.
Solution : Inducing a check to see if marker updation
completed successfully.
Updated all the test case which has the similar
machanism and also moved the "usage" function
to a common place "volume.rc"
Change-Id: I36ddbc5ebbf1b74c9d326a0d1d5f3b32f20a906a
BUG: 1229297
Signed-off-by: Sachin Pandit <spandit@redhat.com>
Signed-off-by: vmallika <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/11125
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'tests/bugs/quota/bug-1178130.t')
-rw-r--r-- | tests/bugs/quota/bug-1178130.t | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/bugs/quota/bug-1178130.t b/tests/bugs/quota/bug-1178130.t index a1ed1109580..f75bcd4f03c 100644 --- a/tests/bugs/quota/bug-1178130.t +++ b/tests/bugs/quota/bug-1178130.t @@ -9,12 +9,6 @@ cleanup; -function usage() -{ - local QUOTA_PATH=$1; - $CLI volume quota $V0 list $QUOTA_PATH | grep "$QUOTA_PATH" | awk '{print $4}' -} - QDD=$(dirname $0)/quota # compile the test write program and run it build_tester $(dirname $0)/../../basic/quota.c -o $QDD @@ -35,7 +29,7 @@ TEST $CLI volume quota $V0 hard-timeout 0 TEST $CLI volume quota $V0 soft-timeout 0 TEST $QDD $M0/file 256 40 -EXPECT "10.0MB" usage "/" +EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "10.0MB" quotausage "/" TEST kill_brick $V0 $H0 $B0/${V0}2 TEST mv $M0/file $M0/file2 @@ -45,7 +39,7 @@ TEST $CLI volume start $V0 force; EXPECT_WITHIN $HEAL_TIMEOUT "0" STAT "$B0/${V0}2/file2" #usage should remain same after rename and self-heal operation -EXPECT "10.0MB" usage "/" +EXPECT "10.0MB" quotausage "/" TEST $CLI volume stop $V0 TEST $CLI volume delete $V0 |