Merge "Fix PM_MAPPER_01 test - use a non-generic log"
[integration/csit.git] / tests / dcaegen2 / testcases / resources / DcaeLibrary.py
index 6b96826..a9d5def 100644 (file)
@@ -87,6 +87,18 @@ class DcaeLibrary(object):
         time.sleep(5)
         return
 
+    @staticmethod
+    def dmaap_message_receive_on_topic(evtobj, topic):
+
+        evt_str = DMaaP.deque_event()
+        while evt_str != None:
+            if evtobj in evt_str and topic in evt_str:
+                logger.info("DMaaP Receive Expected Publish Event:\n" + evt_str)
+                logger.info("On Expected Topic:\n" + topic)
+                return 'true'
+            evt_str = DMaaP.deque_event()
+        return 'false'
+
     @staticmethod
     def dmaap_message_receive(evtobj, action='contain'):