From 70814f9612ebf35ff2c335338db6b40ca9a225ba Mon Sep 17 00:00:00 2001 From: "Thierry bordaz (tbordaz)" Date: Fri, 12 Sep 2014 18:14:53 +0200 Subject: [PATCH] Ticket 47787: Make the test case more robust Sometime the MOD (description) M2->M1 takes some time and we need to be sure it is replicated before checking that the target entry is identical M1 vs. M2 --- dirsrvtests/tickets/ticket47787_test.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dirsrvtests/tickets/ticket47787_test.py b/dirsrvtests/tickets/ticket47787_test.py index 81d5324..e9fa876 100644 --- a/dirsrvtests/tickets/ticket47787_test.py +++ b/dirsrvtests/tickets/ticket47787_test.py @@ -269,7 +269,16 @@ def _status_entry_both_server(topology, name=None, desc=None, debug=True): if not name: return topology.master1.log.info("\n\n######################### Tombstone on M1 ######################\n") - ent_m1 = _find_tombstone(topology.master1, SUFFIX, 'sn', name) + attr = 'description' + found = False + attempt = 0 + while not found and attempt < 10: + ent_m1 = _find_tombstone(topology.master1, SUFFIX, 'sn', name) + if attr in ent_m1.getAttrs(): + found = True + else: + time.sleep(1) + attempt = attempt + 1 assert ent_m1 topology.master1.log.info("\n\n######################### Tombstone on M2 ######################\n") -- 1.7.11.7