]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
tests: fix race condition testing auto scrub 6724/head
authorLoic Dachary <ldachary@redhat.com>
Sat, 28 Nov 2015 16:55:46 +0000 (17:55 +0100)
committerLoic Dachary <ldachary@redhat.com>
Sun, 29 Nov 2015 11:17:16 +0000 (12:17 +0100)
commitf79e28902f51e2d7add5aa8a11cb3a164aa22b34
tree428cf8836efe77e6c20c7ccac7405ea1a5bdda32
parent4189380f1f0ddc25e20b4ded724c928da9635c09
tests: fix race condition testing auto scrub

When testing auto scrub, waiting 20 seconds for the scrub to complete is
sometimes not enough and creates false negatives.

Split wait_for_scrub out of the repair helper so that it can be used to
wait for the scrub to happen instead of using a timer.

The scrub timestamp is obtained after removing the object, therefore
there is a chance for the scrub to be finished already. But since auto
scrub is scheduled every 5 seconds, it will only make the test wait an
extra 5 seconds and not hang forever.

http://tracker.ceph.com/issues/13592

Signed-off-by: Xinze Chi <xinze@xsky.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
qa/workunits/ceph-helpers.sh
src/test/osd/osd-scrub-repair.sh