From 135f0e99470f4541ecda7ab24e36407a112d60eb Mon Sep 17 00:00:00 2001 From: Mykola Golub Date: Fri, 21 Dec 2018 13:30:09 +0200 Subject: [PATCH] test/librados_test_stub: handle object doesn't exist gracefully Fixes: https://tracker.ceph.com/issues/37672 Signed-off-by: Mykola Golub --- src/test/librados_test_stub/TestWatchNotify.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/librados_test_stub/TestWatchNotify.cc b/src/test/librados_test_stub/TestWatchNotify.cc index 88cfcbe316da..0068d075e601 100644 --- a/src/test/librados_test_stub/TestWatchNotify.cc +++ b/src/test/librados_test_stub/TestWatchNotify.cc @@ -360,7 +360,10 @@ void TestWatchNotify::finish_notify(TestRadosClient *rados_client, ceph_assert(m_lock.is_locked()); SharedWatcher watcher = get_watcher(pool_id, nspace, oid); - ceph_assert(watcher); + if (!watcher) { + ldout(cct, 1) << "oid=" << oid << ": not found" << dendl; + return; + } NotifyHandles::iterator it = watcher->notify_handles.find(notify_id); if (it == watcher->notify_handles.end()) { -- 2.47.3