From: Mykola Golub Date: Fri, 21 Dec 2018 11:30:09 +0000 (+0200) Subject: test/librados_test_stub: handle object doesn't exist gracefully X-Git-Tag: v14.1.0~557^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=135f0e99470f4541ecda7ab24e36407a112d60eb;p=ceph.git test/librados_test_stub: handle object doesn't exist gracefully Fixes: https://tracker.ceph.com/issues/37672 Signed-off-by: Mykola Golub --- 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()) {