Remove just deleted POP3 messages from the internal maps

Authored by nowicki on Oct 5 2018, 8:07 PM.

Description

Remove just deleted POP3 messages from the internal maps

This is to prevent attempts to delete them again.

Fixes the testCountBasedLeaveRule, which excercises the following
scenario:

  • initial state: 3 messages known
  • two new messages are added on server
  • LIST returns 5 messages
  • UIDL returns 5 UIDs, 2 of them new
  • download of 2 messages starts
  • fetch of first message is completed
  • item create for first message is completed
  • item create completion triggers cleanup of unwanted server messages
  • messages 1 and 3 are deleted as they are the oldest
  • fetch of second message is completed
  • item create for second message is completed
  • item create completion triggers cleanup of unwanted server messages
  • messages 1 and 3 are deleted again - this causes the test to fail

Removing those identifiers causes the second search for items to
delete to return an empty set and no further delete attempts are made.

Reviewers: KDE PIM

Reviewed By: dvratil

Tags: KDE PIM

Differential Revision: https://phabricator.kde.org/D15975

Details

Committed
nowickiOct 9 2018, 6:02 AM
Reviewer
dvratil
Differential Revision
D15975: Remove just deleted POP3 messages from the internal maps
Parents
R44:647eb5029913: Qualify all POP3 mails for deletion if supplied id == -1
Branches
Unknown
Tags
Unknown