diff options
authorN Balachandran <>2015-12-09 19:36:42 +0530
committerDan Lambright <>2015-12-10 06:43:19 -0800
commitaeaee78c4ec88f3c00efe22edc796102e03291da (patch)
parent3949541b21b1d03ab37c7ab39f95581d553251d4 (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: Ieccc736f387fcf6afaa72fa9918adb6dd34f2c8a BUG: 1289845 Signed-off-by: N Balachandran <> Reviewed-on: Tested-by: NetBSD Build System <> Tested-by: Gluster Build System <> Reviewed-by: Dan Lambright <> Tested-by: Dan Lambright <>
2 files changed, 8 insertions, 5 deletions
diff --git a/ b/
index 4736c78..e6d9cee 100755
--- a/
+++ b/
@@ -210,7 +210,6 @@ function is_bad_test ()
./tests/basic/afr/split-brain-healing.t \
./tests/basic/afr/sparse-file-self-heal.t \
./tests/basic/afr/replace-brick-self-heal.t \
- ./tests/bugs/tier/bug-1279376-rename-demoted-file.t \
./tests/bugs/snapshot/bug-1140162-file-snapshot-features-encrypt-opts-validation.t \
./tests/basic/afr/arbiter-statfs.t \
./tests/features/weighted-rebalance.t \
diff --git a/tests/bugs/tier/bug-1279376-rename-demoted-file.t b/tests/bugs/tier/bug-1279376-rename-demoted-file.t
index c75c398..98e61ae 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 @@
@@ -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 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
# 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