diff options
Diffstat (limited to 'tests/basic')
-rw-r--r-- | tests/basic/tier/legacy-many.t | 9 | ||||
-rw-r--r-- | tests/basic/tier/new-tier-cmds.t | 4 | ||||
-rwxr-xr-x | tests/basic/tier/tier.t | 3 | ||||
-rw-r--r-- | tests/basic/tier/tierd_check.t | 10 |
4 files changed, 21 insertions, 5 deletions
diff --git a/tests/basic/tier/legacy-many.t b/tests/basic/tier/legacy-many.t index a9fcba85209..1782ca70088 100644 --- a/tests/basic/tier/legacy-many.t +++ b/tests/basic/tier/legacy-many.t @@ -23,6 +23,10 @@ function read_all { done } +function tier_status () { + $CLI volume tier $V0 status | grep "success" | wc -l +} + cleanup TEST glusterd @@ -47,7 +51,6 @@ wait # Attach tier TEST $CLI volume attach-tier $V0 replica 2 $H0:$B0/${V0}$CACHE_BRICK_FIRST $H0:$B0/${V0}$CACHE_BRICK_LAST -TEST $CLI volume rebalance $V0 tier status TEST $CLI volume set $V0 cluster.tier-mode test TEST $CLI volume set $V0 cluster.tier-demote-frequency $DEMOTE_FREQ @@ -56,7 +59,9 @@ TEST $CLI volume set $V0 cluster.read-freq-threshold 0 TEST $CLI volume set $V0 cluster.write-freq-threshold 0 # wait a little for lookup heal to finish -sleep 10 +wait_for_tier_start + +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" tier_status # make sure fix layout completed CPATH=$B0/${V0}0 diff --git a/tests/basic/tier/new-tier-cmds.t b/tests/basic/tier/new-tier-cmds.t index dbfac54938e..afc875710ac 100644 --- a/tests/basic/tier/new-tier-cmds.t +++ b/tests/basic/tier/new-tier-cmds.t @@ -40,7 +40,7 @@ EXPECT "Tier command failed" $CLI_1 volume tier $V0 detach status TEST $CLI_1 volume tier $V0 detach start -TEST $CLI_1 volume tier $V0 detach status +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" tier_detach_status #kill a node TEST kill_node 2 @@ -55,7 +55,7 @@ TEST $glusterd_2; EXPECT_WITHIN $PROBE_TIMEOUT 2 check_peers; -TEST $CLI_1 volume tier $V0 detach status +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" tier_detach_status TEST $CLI_1 volume tier $V0 detach stop diff --git a/tests/basic/tier/tier.t b/tests/basic/tier/tier.t index 7bac2dd03bb..a5bd09f8028 100755 --- a/tests/basic/tier/tier.t +++ b/tests/basic/tier/tier.t @@ -119,6 +119,9 @@ cd /tmp umount $M0 TEST $CLI volume stop $V0 TEST $CLI volume start $V0 + +wait_for_tier_start + TEST $GFS --volfile-id=/$V0 --volfile-server=$H0 $M0; cd $M0 diff --git a/tests/basic/tier/tierd_check.t b/tests/basic/tier/tierd_check.t index 1f88ea0b72e..6aef1048ee2 100644 --- a/tests/basic/tier/tierd_check.t +++ b/tests/basic/tier/tierd_check.t @@ -24,7 +24,7 @@ function tier_status () { } function tier_deamon_kill () { -pkill -f "rebalance/$V0" +pkill -f "tierd/$V0" echo "$?" } @@ -40,6 +40,8 @@ EXPECT_WITHIN $PROBE_TIMEOUT 2 check_peers; #Create and start a tiered volume create_dist_tier_vol +wait_for_tier_start + EXPECT_WITHIN $PROCESS_UP_TIMEOUT 0 tier_daemon_check EXPECT_WITHIN $PROCESS_UP_TIMEOUT "2" tier_status @@ -48,6 +50,8 @@ EXPECT_WITHIN $PROCESS_UP_TIMEOUT 0 tier_deamon_kill TEST $CLI_1 volume tier $V0 start +wait_for_tier_start + EXPECT_WITHIN $PROCESS_UP_TIMEOUT "0" tier_daemon_check EXPECT_WITHIN $PROCESS_UP_TIMEOUT "2" tier_status @@ -56,6 +60,8 @@ EXPECT_WITHIN $PROCESS_UP_TIMEOUT "0" tier_deamon_kill TEST $CLI_3 volume tier $V0 start force +wait_for_tier_start + EXPECT_WITHIN $PROCESS_UP_TIMEOUT "0" tier_daemon_check #The pattern progress should occur twice only. @@ -79,6 +85,8 @@ TEST $CLI_3 volume stop $V0 TEST $CLI_3 volume start $V0 +wait_for_tier_start + EXPECT_WITHIN $PROCESS_UP_TIMEOUT "2" tier_status #check for detach start and stop |