Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(python): Wait for bot's DC_EVENT_IMAP_INBOX_IDLE before sending messages to it (#5699) #5714

Merged
merged 1 commit into from
Jun 23, 2024

Conversation

iequidoo
Copy link
Collaborator

Bot processes are run asynchronously, so we shouldn't send messages to a bot before it's fully initialised and skipped existing messages for processing, i.e. before DC_EVENT_IMAP_INBOX_IDLE is emitted.

Close #5699

@iequidoo iequidoo marked this pull request as ready for review June 23, 2024 04:13
@iequidoo iequidoo requested a review from link2xt June 23, 2024 04:13
self._acsetup.start_configure(bot_ac)
self.wait_configured(bot_ac)
bot_ac.start_io()
# Wait for DC_EVENT_IMAP_INBOX_IDLE so that all emails received by the bot later are
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"... appeared in the bot's Inbox later" is probably a better phrasing

…messages to it (#5699)

Bot processes are run asynchronously, so we shouldn't send messages to a bot before it's fully
initialised and skipped existing messages for processing, i.e. before DC_EVENT_IMAP_INBOX_IDLE is
emitted.
@iequidoo iequidoo force-pushed the iequidoo/await-bot-imap-inbox-idle branch from 098f41c to b2ff001 Compare June 23, 2024 04:46
@iequidoo iequidoo merged commit d40ec88 into main Jun 23, 2024
23 of 24 checks passed
@iequidoo iequidoo deleted the iequidoo/await-bot-imap-inbox-idle branch June 23, 2024 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test_echo_quit_plugin() fails due to fetching existing messages from a reused account
2 participants