From 9a21d5e9d9fc5088b0bbbd23aaf6126915994474 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Sat, 8 Aug 2020 17:35:07 +0300 Subject: [PATCH] Second attempt to fix flaky test The server sometimes reorders the messages even if they were accepted strictly in sequence. --- python/tests/test_account.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/python/tests/test_account.py b/python/tests/test_account.py index 4757d8fe6..a2a7d8980 100644 --- a/python/tests/test_account.py +++ b/python/tests/test_account.py @@ -1669,15 +1669,11 @@ class TestOnlineAccount: for text in texts: chat12.send_text(text) - # Ensure messages are delivered in exactly this order. - ac1._evtracker.get_matching("DC_EVENT_SMTP_MESSAGE_SENT") - ac1._evtracker.get_matching("DC_EVENT_MSG_DELIVERED") - lp.sec("ac2: waiting for all messages on the other side") to_delete = [] for text in texts: msg = ac2._evtracker.wait_next_incoming_message() - assert msg.text == text + assert msg.text in texts if text != "third": to_delete.append(msg)