mirror of
https://github.com/chatmail/core.git
synced 2026-05-01 20:36:31 +03:00
Merge pull request #1816 from deltachat/flaky-noop
python: fix more flaky tests
This commit is contained in:
@@ -108,6 +108,15 @@ class DirectImap:
|
|||||||
|
|
||||||
def get_all_messages(self):
|
def get_all_messages(self):
|
||||||
assert not self._idling
|
assert not self._idling
|
||||||
|
|
||||||
|
# Flush unsolicited responses. IMAPClient has problems
|
||||||
|
# dealing with them: https://github.com/mjs/imapclient/issues/334
|
||||||
|
# When this NOOP was introduced, next FETCH returned empty
|
||||||
|
# result instead of a single message, even though IMAP server
|
||||||
|
# can only return more untagged responses than required, not
|
||||||
|
# less.
|
||||||
|
self.conn.noop()
|
||||||
|
|
||||||
return self.conn.fetch(ALL, [FLAGS])
|
return self.conn.fetch(ALL, [FLAGS])
|
||||||
|
|
||||||
def get_unread_messages(self):
|
def get_unread_messages(self):
|
||||||
|
|||||||
@@ -1688,14 +1688,6 @@ class TestOnlineAccount:
|
|||||||
lp.sec("imap2: test that only one message is left")
|
lp.sec("imap2: test that only one message is left")
|
||||||
imap2 = ac2.direct_imap
|
imap2 = ac2.direct_imap
|
||||||
|
|
||||||
# Flush unsolicited responses. IMAPClient has problems
|
|
||||||
# dealing with them: https://github.com/mjs/imapclient/issues/334
|
|
||||||
# When this NOOP was introduced, next FETCH returned empty
|
|
||||||
# result instead of a single message, even though IMAP server
|
|
||||||
# can only return more untagged responses than required, not
|
|
||||||
# less.
|
|
||||||
imap2.conn.noop()
|
|
||||||
|
|
||||||
assert len(imap2.get_all_messages()) == 1
|
assert len(imap2.get_all_messages()) == 1
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user