test/librados_test_stub: handle object doesn't exist gracefully

Fixes: https://tracker.ceph.com/issues/37672
Signed-off-by: Mykola Golub <mgolub@suse.com>
This commit is contained in:
Mykola Golub 2018-12-21 13:30:09 +02:00
parent b26a5a942c
commit 135f0e9947

View File

@ -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()) {