Merge pull request #26741 from cbodley/wip-test-rgw-reshard-wait2

test/rgw: fix race in test_rgw_reshard_wait

Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Casey Bodley 2019-03-04 12:30:48 -05:00 committed by GitHub
commit 97dbbf0cfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;