summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2015-12-13 11:43:18 +0530
committerDan Lambright <dlambrig@redhat.com>2015-12-21 05:28:51 -0800
commit7ef768acf706b2f08bbb2b48ef75d9abcc66b5be (patch)
tree38550800c48c75d580875e56bf8addc95ae07faf /tests
parent871bfc1c1418290c30484015f11a8c476489ca2a (diff)
tests/tier: spurious failure in rename test
bug-1279376-rename-demoted-file.t fails sometimes The fix is based on the assumption that the test failed because the demotion happened too quickly. Change-Id: I7fa9f511c96aa2bc00e4d41d479f67018d369329 BUG: 1291046 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/12958 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/bugs/tier/bug-1279376-rename-demoted-file.t12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/bugs/tier/bug-1279376-rename-demoted-file.t b/tests/bugs/tier/bug-1279376-rename-demoted-file.t
index c75c398ce28..485a14ddde1 100755
--- a/tests/bugs/tier/bug-1279376-rename-demoted-file.t
+++ b/tests/bugs/tier/bug-1279376-rename-demoted-file.t
@@ -6,7 +6,7 @@
NUM_BRICKS=2
-DEMOTE_FREQ=5
+DEMOTE_FREQ=15
DEMOTE_TIMEOUT=10
PROMOTE_FREQ=500
@@ -32,6 +32,7 @@ function create_dist_tier_vol () {
TEST $CLI volume set $V0 cluster.tier-mode test
#We do not want any files to be promoted during this test
+ TEST $CLI volume set $V0 features.record-counters on
TEST $CLI volume set $V0 cluster.read-freq-threshold 50
TEST $CLI volume set $V0 cluster.write-freq-threshold 50
}
@@ -54,7 +55,7 @@ TEST glusterfs -s $H0 --volfile-id $V0 $M0
# The file will be created on the hot tier
-touch "$M0/$SRC_FILE"
+TEST touch "$M0/$SRC_FILE"
# Get the path of the file on the hot tier
HPATH=`find $B0/hot/ -name "$SRC_FILE"`
@@ -64,13 +65,16 @@ echo "File path on hot tier: "$HPATH
EXPECT "yes" exists_and_regular_file $HPATH
# Wait for the tier process to demote the file
-sleep $DEMOTE_TIMEOUT
+sleep $DEMOTE_FREQ
# Get the path of the file on the cold tier
CPATH=`find $B0/cold/ -name "$SRC_FILE"`
echo "File path on cold tier: "$CPATH
-EXPECT "yes" exists_and_regular_file $CPATH
+EXPECT_WITHIN $DEMOTE_TIMEOUT "yes" exists_and_regular_file $CPATH
+
+# We don't want $DST_FILE to get demoted
+TEST $CLI volume set $V0 cluster.tier-demote-frequency $PROMOTE_FREQ
#This will be created on the hot tier