summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2015-09-01 14:21:43 +0530
committerAtin Mukherjee <amukherj@redhat.com>2015-09-04 00:07:48 -0700
commit0600ffcc1fc425daa9c98d77a0f1531cd7902589 (patch)
tree3603f9657ba71f8510c992aab23d5ffd83568265 /tests
parent5bb4143e0a59ad69ac6ef74c2957784cf660c1fd (diff)
test: fix spurious failure from ./tests/basic/quota-nfs.t
This is a backport of http://review.gluster.org/#/c/12075/ Before checking for the quota usage, umount and mount NFS mountpoint to flush the NFS cached data. This test is fails on NetBSD, so marking the test as bad-test > Change-Id: I1f30f5d9a919b3959c9f158366bd2f47569c8e03 > BUG: 1258766 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: I86f24435224851e60d96c39126de92d54b2a19da BUG: 1259652 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/12097 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/basic/quota-nfs.t14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/basic/quota-nfs.t b/tests/basic/quota-nfs.t
index f295aaee79b..00c76a49f56 100755
--- a/tests/basic/quota-nfs.t
+++ b/tests/basic/quota-nfs.t
@@ -17,6 +17,7 @@ TEST $CLI volume create $V0 $H0:$B0/brick1;
EXPECT 'Created' volinfo_field $V0 'Status';
TEST $CLI volume set $V0 network.inode-lru-limit 1
+TEST $CLI volume set $V0 performance.nfs.write-behind off
TEST $CLI volume start $V0;
EXPECT 'Started' volinfo_field $V0 'Status';
@@ -34,6 +35,17 @@ TEST $CLI volume quota $V0 soft-timeout 0
TEST $CLI volume quota $V0 hard-timeout 0
TEST $QDD $N0/$deep/newfile_1 256 20
+
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT "0" STAT $N0/$deep/file
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT "0" STAT $N0/$deep/newfile_1
+
+#Unmount and mount to flush the data
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" umount_nfs $N0
+TEST mount_nfs $H0:/$V0 $N0
+
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT "0" STAT $N0/$deep/file
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT "0" STAT $N0/$deep/newfile_1
+
# wait for write behind to complete.
EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "15.0MB" quotausage "/"
@@ -42,7 +54,7 @@ TEST ! $QDD $N0/$deep/newfile_2 256 400
TEST rm -f $N0/$deep/newfile_2
## Before killing daemon to avoid deadlocks
-umount_nfs $N0
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" umount_nfs $N0
TEST $CLI volume stop $V0
EXPECT "1" get_aux