Skip to content

Commit

Permalink
test/librados/tier.cc: destroy and recreate cache pool on every test
Browse files Browse the repository at this point in the history
Namespaces are not sufficient with the checks for 11493 in the mon.

Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit bef09e0)
  • Loading branch information
athanatos authored and liewegas committed Jun 15, 2015
1 parent 70bba62 commit 58e6266
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/test/librados/tier.cc
Expand Up @@ -76,16 +76,15 @@ class LibRadosTwoPoolsPP : public RadosTestPP
static void SetUpTestCase() {
pool_name = get_temp_pool_name();
ASSERT_EQ("", create_one_pool_pp(pool_name, s_cluster));
cache_pool_name = get_temp_pool_name();
ASSERT_EQ(0, s_cluster.pool_create(cache_pool_name.c_str()));
}
static void TearDownTestCase() {
ASSERT_EQ(0, s_cluster.pool_delete(cache_pool_name.c_str()));
ASSERT_EQ(0, destroy_one_pool_pp(pool_name, s_cluster));
}
static std::string cache_pool_name;

virtual void SetUp() {
cache_pool_name = get_temp_pool_name();
ASSERT_EQ(0, s_cluster.pool_create(cache_pool_name.c_str()));
RadosTestPP::SetUp();
ASSERT_EQ(0, cluster.ioctx_create(cache_pool_name.c_str(), cache_ioctx));
cache_ioctx.set_namespace(nspace);
Expand Down Expand Up @@ -114,6 +113,7 @@ class LibRadosTwoPoolsPP : public RadosTestPP
cleanup_namespace(cache_ioctx, nspace);

cache_ioctx.close();
ASSERT_EQ(0, s_cluster.pool_delete(cache_pool_name.c_str()));
}
librados::IoCtx cache_ioctx;
};
Expand Down Expand Up @@ -2399,16 +2399,15 @@ class LibRadosTwoPoolsECPP : public RadosTestECPP
static void SetUpTestCase() {
pool_name = get_temp_pool_name();
ASSERT_EQ("", create_one_ec_pool_pp(pool_name, s_cluster));
cache_pool_name = get_temp_pool_name();
ASSERT_EQ(0, s_cluster.pool_create(cache_pool_name.c_str()));
}
static void TearDownTestCase() {
ASSERT_EQ(0, s_cluster.pool_delete(cache_pool_name.c_str()));
ASSERT_EQ(0, destroy_one_ec_pool_pp(pool_name, s_cluster));
}
static std::string cache_pool_name;

virtual void SetUp() {
cache_pool_name = get_temp_pool_name();
ASSERT_EQ(0, s_cluster.pool_create(cache_pool_name.c_str()));
RadosTestECPP::SetUp();
ASSERT_EQ(0, cluster.ioctx_create(cache_pool_name.c_str(), cache_ioctx));
cache_ioctx.set_namespace(nspace);
Expand Down Expand Up @@ -2437,6 +2436,7 @@ class LibRadosTwoPoolsECPP : public RadosTestECPP
cleanup_namespace(cache_ioctx, nspace);

cache_ioctx.close();
ASSERT_EQ(0, s_cluster.pool_delete(cache_pool_name.c_str()));
}

librados::IoCtx cache_ioctx;
Expand Down

0 comments on commit 58e6266

Please sign in to comment.