[389-commits] dirsrvtests/tickets

thierry bordaz tbordaz at fedoraproject.org
Fri Sep 12 17:10:20 UTC 2014


 dirsrvtests/tickets/ticket47787_test.py |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 52e57deb427ed84f226f0cf6ce2bcc63d8782c02
Author: Thierry bordaz (tbordaz) <tbordaz at redhat.com>
Date:   Fri Sep 12 19:07:11 2014 +0200

    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")




More information about the 389-commits mailing list