mirror of
https://github.com/ceph/ceph
synced 2024-12-28 22:43:29 +00:00
test/rgw: fix race in test_rgw_reshard_wait
start the timer before scheduling the wait Signed-off-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
parent
634780fe07
commit
3729d6a985
@ -67,10 +67,10 @@ TEST(ReshardWait, wait_yield)
|
||||
EXPECT_EQ(0, waiter.wait(optional_yield{context, yield}));
|
||||
});
|
||||
|
||||
const ceph::real_time start = ceph::real_clock::now();
|
||||
EXPECT_EQ(1u, context.poll()); // spawn
|
||||
EXPECT_FALSE(context.stopped());
|
||||
|
||||
const ceph::real_time start = ceph::real_clock::now();
|
||||
EXPECT_EQ(1u, context.run_one()); // timeout
|
||||
EXPECT_TRUE(context.stopped());
|
||||
const ceph::timespan elapsed = ceph::real_clock::now() - start;
|
||||
|
Loading…
Reference in New Issue
Block a user