From: Loic Dachary Date: Wed, 12 Aug 2015 12:59:01 +0000 (+0200) Subject: tests: be more generous with mon tests timeouts X-Git-Tag: v9.1.0~371^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b78883b18868d6325cbdfb9c80f833015187b90a;p=ceph.git tests: be more generous with mon tests timeouts Change the timeouts of the TEST_mon_add_to_single_mon tests to be 120 seconds. They have value to guard against blocking forever. The exact timing does not matter as long as the operation completes. When a timeout is too short, it will create false negatives when running on slow machines. It could be argued that being too generous with timeout in general may hide problems. But not in this specific case. Signed-off-by: Loic Dachary --- diff --git a/src/test/mon/misc.sh b/src/test/mon/misc.sh index 6089abec0bf21..8f49f9e41255d 100755 --- a/src/test/mon/misc.sh +++ b/src/test/mon/misc.sh @@ -99,7 +99,7 @@ function TEST_mon_add_to_single_mon() { setup $dir || return 1 run_mon $dir a --public-addr $MONA || return 1 # wait for the quorum - timeout 3 ceph -s > /dev/null || return 1 + timeout 120 ceph -s > /dev/null || return 1 # strictly speaking it's not a feature, but an expected hahaviour. timeout 3 ceph mon add b $MONB || [ $? = 124 ] || return 1 run_mon $dir b --public-addr $MONB || return 1 @@ -111,12 +111,12 @@ function TEST_mon_add_to_single_mon() { # from mon.b run_mon $dir b --public-addr $MONB || return 1 # wait for the quorum - timeout 9 ceph -s > /dev/null || return 1 + timeout 120 ceph -s > /dev/null || return 1 local num_mons num_mons=$(ceph mon dump --format=xml 2>/dev/null | $XMLSTARLET sel -t -v "count(//mons/mon)") || return 1 [ $num_mons == 2 ] || return 1 - # no reason to take more than 2 secs to get this submitted - timeout 1 ceph mon add b $MONB || return 1 + # no reason to take more than 120 secs to get this submitted + timeout 120 ceph mon add b $MONB || return 1 teardown $dir || return 1 }