diff options
author | Ravishankar N <ravishankar@redhat.com> | 2014-03-26 11:41:37 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-03-30 01:59:18 -0700 |
commit | 36c7f8341540a1c93b5b0aa84688e58ed93422f8 (patch) | |
tree | aa5be1aaebfab418d7be64f2603bbf82ddc75c67 /tests/basic/afr | |
parent | 9a3de81fe5c42c0495dccc5877cecbc2edb81f3c (diff) |
tests/afr: select correct read-child for data OPs.
Change-Id: If84bc489b6c45bde3bdb858da5f1600cea78c8a5
BUG: 1080759
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/7345
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests/basic/afr')
-rw-r--r-- | tests/basic/afr/read-subvol-data.t | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/basic/afr/read-subvol-data.t b/tests/basic/afr/read-subvol-data.t new file mode 100644 index 00000000000..7db4988faee --- /dev/null +++ b/tests/basic/afr/read-subvol-data.t @@ -0,0 +1,33 @@ +#!/bin/bash +#Test if the source is selected based on data transaction for a regular file. + +. $(dirname $0)/../../include.rc +. $(dirname $0)/../../volume.rc +cleanup; + +#Init +TEST glusterd +TEST pidof glusterd +TEST $CLI volume create $V0 replica 2 $H0:$B0/brick{0,1} +TEST $CLI volume set $V0 self-heal-daemon off +TEST $CLI volume set $V0 stat-prefetch off +TEST $CLI volume start $V0 +TEST $CLI volume set $V0 cluster.background-self-heal-count 0 +TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 $M0 --entry-timeout=0 --attribute-timeout=0; + +#Test +TEST $CLI volume set $V0 cluster.read-subvolume $V0-client-1 +TEST $CLI volume set $V0 cluster.data-self-heal off +TEST $CLI volume set $V0 cluster.metadata-self-heal off +TEST $CLI volume set $V0 cluster.entry-self-heal off +TEST dd if=/dev/urandom of=$M0/afr_success_5.txt bs=1M count=1 +TEST kill_brick $V0 $H0 $B0/brick0 +TEST dd if=/dev/urandom of=$M0/afr_success_5.txt bs=1M count=10 +TEST $CLI volume start $V0 force +EXPECT_WITHIN 5 "10485760" echo `ls -l $M0/afr_success_5.txt | awk '{ print $5}'` + +#Cleanup +TEST umount $M0 +TEST $CLI volume stop $V0 +TEST $CLI volume delete $V0 +TEST rm -rf $B0/* |