From 3ffc985968c2fb561316a0b071e83b6cff9333a7 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Tue, 26 Apr 2022 13:25:10 +0200 Subject: [PATCH] try fix a sometimes failing test: don't test python's imap idle as it's not needed. also add some more logging. --- python/tests/test_account.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/python/tests/test_account.py b/python/tests/test_account.py index f63c1332f..2483c7d51 100644 --- a/python/tests/test_account.py +++ b/python/tests/test_account.py @@ -2446,25 +2446,23 @@ class TestOnlineAccount: acfactory.wait_configure_and_start_io() - imap2 = ac2.direct_imap - imap2.idle_start() - lp.sec("ac1: create chat with ac2") chat1 = ac1.create_chat(ac2) ac2.create_chat(ac1) + lp.sec("ac1: send message to ac2") sent_msg = chat1.send_text("hello") - imap2.idle_wait_for_new_message(terminate=False) msg = ac2._evtracker.wait_next_incoming_message() assert msg.text == "hello" - imap2.idle_check(terminate=True) + lp.sec("ac2: wait for close/expunge on autodelete") ac2._evtracker.get_info_contains("close/expunge succeeded") - assert len(imap2.get_all_messages()) == 0 + lp.sec("ac2: check that message was autodeleted on server") + assert len(ac2.direct_imap.get_all_messages()) == 0 - # Mark deleted message as seen and check that read receipt arrives + lp.sec("ac2: Mark deleted message as seen and check that read receipt arrives") msg.mark_seen() ev = ac1._evtracker.get_matching("DC_EVENT_MSG_READ") assert ev.data1 == chat1.id