From: Josh Durgin Date: Tue, 11 Dec 2012 20:26:21 +0000 (-0800) Subject: st_rados_watch: tolerate extra notifies X-Git-Tag: v0.56~76^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=39501822680633b2921925addb24d2498690c781;p=ceph.git st_rados_watch: tolerate extra notifies With retries, it's possible for notifies to be received more than once when they are resent to different OSDs, since the OSDs only track them in memory. Signed-off-by: Josh Durgin --- diff --git a/src/test/system/st_rados_watch.cc b/src/test/system/st_rados_watch.cc index d6647ded8dcee..991dde8ea77e9 100644 --- a/src/test/system/st_rados_watch.cc +++ b/src/test/system/st_rados_watch.cc @@ -73,10 +73,16 @@ run() m_notify_sem->wait(); m_notify_sem->post(); - RETURN1_IF_NOT_VAL(m_num_notifies, num_notifies); + int r = 0; + if (num_notifies < m_num_notifies) { + printf("Received fewer notifies than expected: %d < %d\n", + num_notifies, m_num_notifies); + r = 1; + } + rados_unwatch(io_ctx, m_obj_name.c_str(), handle); rados_ioctx_destroy(io_ctx); rados_shutdown(cl); - return 0; + return r; }