fix another flaky test

This commit is contained in:
holger krekel
2020-07-16 10:51:43 +02:00
parent 6067d40a6f
commit 37943d3d16
3 changed files with 11 additions and 8 deletions

View File

@@ -196,6 +196,7 @@ class DirectImap:
raise TimeoutError
if terminate:
self.idle_done()
self.account.log("imap-direct: idle_check returned {!r}".format(res))
return res
def idle_wait_for_seen(self):

View File

@@ -86,11 +86,11 @@ class FFIEventTracker:
if rex.match(ev.name):
return ev
def get_info_matching(self, regex):
rex = re.compile("(?:{}).*".format(regex))
def get_info_contains(self, regex):
rex = re.compile(regex)
while 1:
ev = self.get_matching("DC_EVENT_INFO")
if rex.match(ev.data2):
if rex.search(ev.data2):
return ev
def ensure_event_not_queued(self, event_name_regex):