]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
tests: fix ceph-helpers.sh wait_for_clean delays 12095/head
authorLoic Dachary <ldachary@redhat.com>
Mon, 21 Nov 2016 09:32:17 +0000 (10:32 +0100)
committerLoic Dachary <ldachary@redhat.com>
Mon, 21 Nov 2016 10:42:42 +0000 (11:42 +0100)
commit5e625674a8b46b7142e6b0cda15460ea82990098
treebdb0e5130c770a747873f33c56d5ea7ac75070c6
parent49bc71bacf2e932fa6f15db3e631f955e2409262
tests: fix ceph-helpers.sh wait_for_clean delays

The TENTH_TIMEOUT was not delcared as an int and failed to be set with
the correct number. The test of the function did not catch this.

Implement computing of the increasingly large sleep delays in a separate
function so that it can be tested more easily. Give up on sub-second
sleep because a the function will not sleep at all if the cluster is
already clean. And if it is not already clean, it is very unlikely to
become clean within less than a second. The downside of having very
short sleep time is that it needlessly stress the machine and also
possibly spam the logs.

Refs: http://tracker.ceph.com/issues/17830

Signed-off-by: Loic Dachary <loic@dachary.org>
qa/workunits/ceph-helpers.sh