mirror of
https://github.com/ceph/ceph
synced 2025-01-21 02:31:19 +00:00
Merge pull request #1657 from ceph/wip-8063
ceph_test_rados_api_tier: fix scrub test Reviewed-by: Samuel Just <sam.just@inktank.com>
This commit is contained in:
commit
2e40afcdce
@ -2490,15 +2490,20 @@ TEST_F(LibRadosTwoPoolsECPP, PromoteSnap) {
|
||||
// clones in the cache tier)
|
||||
// This test requires cache tier and base tier to have the same pg_num/pgp_num
|
||||
{
|
||||
IoCtx cache_ioctx;
|
||||
ASSERT_EQ(0, cluster.ioctx_create(cache_pool_name.c_str(), cache_ioctx));
|
||||
ostringstream ss;
|
||||
ss << "{\"prefix\": \"pg scrub\", \"pgid\": \""
|
||||
<< cache_ioctx.get_id() << "."
|
||||
<< ioctx.get_object_pg_hash_position("foo")
|
||||
<< "\"}";
|
||||
ASSERT_EQ(0, cluster.mon_command(ss.str(), inbl, NULL, NULL));
|
||||
|
||||
for (int tries = 0; tries < 5; ++tries) {
|
||||
IoCtx cache_ioctx;
|
||||
ASSERT_EQ(0, cluster.ioctx_create(cache_pool_name.c_str(), cache_ioctx));
|
||||
ostringstream ss;
|
||||
ss << "{\"prefix\": \"pg scrub\", \"pgid\": \""
|
||||
<< cache_ioctx.get_id() << "."
|
||||
<< ioctx.get_object_pg_hash_position("foo")
|
||||
<< "\"}";
|
||||
int r = cluster.mon_command(ss.str(), inbl, NULL, NULL);
|
||||
if (r == -EAGAIN)
|
||||
continue;
|
||||
ASSERT_EQ(0, r);
|
||||
break;
|
||||
}
|
||||
// give it a few seconds to go. this is sloppy but is usually enough time
|
||||
cout << "waiting for scrub..." << std::endl;
|
||||
sleep(15);
|
||||
|
Loading…
Reference in New Issue
Block a user