diff --git a/tests/conftest.py b/tests/conftest.py index 9e28703c3429..61fde99ebab3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -292,7 +292,7 @@ def SubscribeAsicDbObject(self, objpfx): pubsub.psubscribe("__keyspace@1__:ASIC_STATE:%s*" % objpfx) return pubsub - def CountSubscribedObjects(self, pubsub, timeout=10): + def CountSubscribedObjects(self, pubsub, ignore=None, timeout=10): nadd = 0 ndel = 0 idle = 0 @@ -300,6 +300,10 @@ def CountSubscribedObjects(self, pubsub, timeout=10): message = pubsub.get_message() if message: print message + if ignore: + fds = message['channel'].split(':') + if fds[2] in ignore: + continue if message['data'] == 'hset': nadd += 1 elif message['data'] == 'del': diff --git a/tests/test_warm_reboot.py b/tests/test_warm_reboot.py index 7db91e40a757..2a7d69422096 100644 --- a/tests/test_warm_reboot.py +++ b/tests/test_warm_reboot.py @@ -280,7 +280,7 @@ def test_VlanMgrdWarmRestart(dvs): (exitcode, bv_after) = dvs.runcmd("bridge vlan") assert bv_after == bv_before - (nadd, ndel) = dvs.CountSubscribedObjects(pubsub) + (nadd, ndel) = dvs.CountSubscribedObjects(pubsub, ignore=["SAI_OBJECT_TYPE_FDB_ENTRY"]) assert nadd == 0 assert ndel == 0