Skip to content

Commit cfe543f

Browse files
authored
Merge pull request ceph#61880 from idryomov/wip-70041
test/rbd_mirror: clear Namespace::s_instance at the end of a test Reviewed-by: Vinay Bhaskar Varada <[email protected]>
2 parents 5479edc + c0f5359 commit cfe543f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/rbd_mirror/test_mock_PoolReplayer.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,15 @@ class Namespace<MockTestImageCtx> {
5656
}
5757

5858
Namespace() {
59+
ceph_assert(s_instance == nullptr);
5960
s_instance = this;
6061
}
6162

63+
~Namespace() {
64+
ceph_assert(s_instance == this);
65+
s_instance = nullptr;
66+
}
67+
6268
void add(const std::string &name) {
6369
std::lock_guard locker{m_lock};
6470

0 commit comments

Comments
 (0)