From 52e57deb427ed84f226f0cf6ce2bcc63d8782c02 Mon Sep 17 00:00:00 2001 From: Thierry bordaz (tbordaz) Date: Sep 12 2014 17:07:11 +0000 Subject: Ticket 47787: Make the test case more robust Description 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 https://fedorahosted.org/389/ticket/47787 reviewed by: Mark Reynolds (Thanks Mark !) Platforms tested: F20 Flag Day: no Doc impact: no --- 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")