From: Samuel Just Date: Fri, 8 May 2015 17:26:48 +0000 (-0700) Subject: test/librados/tier.cc: destroy and recreate cache pool on every test X-Git-Tag: v0.94.3~67^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=58e62662f6ef04ac76470090d1d958467e34194a;p=ceph.git test/librados/tier.cc: destroy and recreate cache pool on every test Namespaces are not sufficient with the checks for 11493 in the mon. Signed-off-by: Samuel Just (cherry picked from commit bef09e0cdb274cb1c87335a2af9ee532d14a4596) --- diff --git a/src/test/librados/tier.cc b/src/test/librados/tier.cc index 208380bc7b9d..1e94bddd89ec 100644 --- a/src/test/librados/tier.cc +++ b/src/test/librados/tier.cc @@ -76,16 +76,15 @@ protected: 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); @@ -114,6 +113,7 @@ protected: cleanup_namespace(cache_ioctx, nspace); cache_ioctx.close(); + ASSERT_EQ(0, s_cluster.pool_delete(cache_pool_name.c_str())); } librados::IoCtx cache_ioctx; }; @@ -2399,16 +2399,15 @@ protected: 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); @@ -2437,6 +2436,7 @@ protected: cleanup_namespace(cache_ioctx, nspace); cache_ioctx.close(); + ASSERT_EQ(0, s_cluster.pool_delete(cache_pool_name.c_str())); } librados::IoCtx cache_ioctx;