Skip to content

Commit 84ebb30

Browse files
committed
common/test: do not test exception raised from recursive lock
The C++ standard does not require that implementations raise std::system_error when double-locking a non-recursive lock. Our implementation of debug_mutex now catches this error with a ceph_assert so it cannot be caught. Signed-off-by: Patrick Donnelly <[email protected]>
1 parent 1213df9 commit 84ebb30

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/test/common/test_mutex_debug.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ TEST(MutexDebug, NotRecursive) {
6565
ASSERT_TRUE(m.is_locked());
6666
ASSERT_FALSE(std::async(std::launch::async, ttl, &m).get());
6767

68-
ASSERT_THROW(m.lock(), std::system_error);
6968
ASSERT_TRUE(m.is_locked());
7069
ASSERT_FALSE(std::async(std::launch::async, ttl, &m).get());
7170

0 commit comments

Comments
 (0)