]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: be more generous with mon tests timeouts
authorLoic Dachary <ldachary@redhat.com>
Wed, 12 Aug 2015 12:59:01 +0000 (14:59 +0200)
committerLoic Dachary <ldachary@redhat.com>
Wed, 12 Aug 2015 14:59:29 +0000 (16:59 +0200)
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 <ldachary@redhat.com>
src/test/mon/misc.sh

index 6089abec0bf21d0fda7c563dfe37c907b5343543..8f49f9e41255daaab47a524c7c6bd897803beb58 100755 (executable)
@@ -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
 }