]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/watch_notify_same_primary: fix test for new watch/notify
authorSage Weil <sage@redhat.com>
Wed, 10 Dec 2014 16:00:36 +0000 (08:00 -0800)
committerSage Weil <sage@redhat.com>
Wed, 10 Dec 2014 16:36:18 +0000 (08:36 -0800)
It now checks for 'notify1' and 'notify2' strings, allowing it to work
on both old and new versions of rados watch command.

Signed-off-by: Sage Weil <sage@redhat.com>
tasks/watch_notify_same_primary.py

index 10251b860c79b85515f66d6452b972f52232f21e..b83a7a972358a4a55560f28c5cfb576b6d4ef6a4 100644 (file)
@@ -97,8 +97,15 @@ def task(ctx, config):
 
         for watch in watches:
             lines = watch.stdout.getvalue().split("\n")
-            print lines
-            assert len(lines) == 4
+            got1 = False
+            got2 = False
+            for l in lines:
+                if 'notify1' in l:
+                    got1 = True
+                if 'notify2' in l:
+                    got2 = True
+            log.info(lines)
+            assert got1 and got2
 
         ctx.manager.revive_osd(0)
         ctx.manager.remove_pool(pool)