# Discard any previously queued messages.
@classmethod
def discardMessages(cls):
- cls.msg_ctx.loop_once(0.001)
- while cls.context["messages"]:
- cls.context["messages"] = []
- cls.msg_ctx.loop_once(0.001)
+ messages = cls.context["messages"]
+
+ while True:
+ messages.clear()
+
+ # tevent presumably has other tasks to run, so we might need two or
+ # three loops before a message comes through.
+ for _ in range(5):
+ cls.msg_ctx.loop_once(0.001)
+
+ if not messages:
+ # No new messages. We’ve probably got them all.
+ break
# Remove any NETLOGON authentication messages
# NETLOGON is only performed once per session, so to avoid ordering
+++ /dev/null
-^samba.tests.auth_log_pass_change.samba.tests.auth_log_pass_change.AuthLogPassChangeTests.test_ldap_change_password_bad_user.ad_dc_ntvfs
-^samba.tests.auth_log_pass_change.samba.tests.auth_log_pass_change.AuthLogPassChangeTests.test_ldap_change_password_bad_user.ad_dc_smb1