]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
test/rgw: RGWReshardWait uses std::chrono::steady_clock
authorCasey Bodley <cbodley@redhat.com>
Mon, 18 Mar 2019 18:54:51 +0000 (14:54 -0400)
committerCasey Bodley <cbodley@redhat.com>
Mon, 18 Mar 2019 18:54:53 +0000 (14:54 -0400)
commitdb1a74b274748884079abe5a4615ab5b9be106c4
tree71fd0d9239843575aa372f0e516718a810e89348
parent9c024bafa3570dee401d3fcaf04754376f285eca
test/rgw: RGWReshardWait uses std::chrono::steady_clock

the synchronous wait() call uses std::condition_variable::wait_for(),
which is based on std::chrono::steady_clock. this changes the asynchronous
waits (along with timing in the unit test) to use that same clock

should resolve this test failure:

[ RUN      ] ReshardWait.wait_yield
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/rgw/test_rgw_reshard_wait.cc:78:
Failure
Expected: (wait_duration) <= (elapsed), actual: 0.01s vs 0.00835688s
[  FAILED  ] ReshardWait.wait_yield (8 ms)

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_reshard.h
src/test/rgw/test_rgw_reshard_wait.cc