From: Douglas Bagnall Date: Wed, 8 Sep 2021 05:01:26 +0000 (+1200) Subject: pytest/rodc_rwdc: try to avoid race. X-Git-Tag: ldb-2.5.0~379 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a169e013e66bab15e594ce49b805edebfcd503cf;p=thirdparty%2Fsamba.git pytest/rodc_rwdc: try to avoid race. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14868 Signed-off-by: Douglas Bagnall Reviewed-by: Stefan Metzmacher --- diff --git a/source4/dsdb/tests/python/rodc_rwdc.py b/source4/dsdb/tests/python/rodc_rwdc.py index d628c609d8c..9aab24a8caf 100644 --- a/source4/dsdb/tests/python/rodc_rwdc.py +++ b/source4/dsdb/tests/python/rodc_rwdc.py @@ -250,6 +250,10 @@ class RodcRwdcCachedTests(password_lockout_base.BasePasswordTestCase): res = ldb_system.search(userdn, attrs=['unicodePwd']) self.assertTrue('unicodePwd' in res[0]) + # force replication here to flush any pending preloads (this + # was a racy test). + self.force_replication() + newpass = userpass + '!' # Forcing replication should blank out password (when changed)