Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-3056

Unit tests for mailbox inconsitencies

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • mailbox
    • None

    Description

      Circumstances

      How
      mailboxPath exists but not the mailbox

      • create a mailbox by `CassandraMailboxMapper.trySave()`
      • trigger failure on the second step (mailboxDAO.save()) - (mockito)

      mailbox exists but not the mailboxPath

      • delete a mailbox `CassandraMailboxMapper.delete()`
      • trigger failure on the second step (mailboxDAO.delete()) - (mockito)

      if mailbox has id1/path1 and id2/path1 but mailboxPath only have id1/path1 (GhostMailbox)

      • Create a mailbox with id1/path1 with pathV1 (pathV1 only, assuming old data at the moment V2 is not yet implemented)
      • migrate pathV1 -> pathV2 (insert pathV2, then delete pathV1). Trigger a failure on delete pathV1, then we have both pathV1 and pathV2 exist. (id1/path1)
      • delete mailbox id1/path1 (delete pathV1, pathV2 -> delete mailbox). Trigger a failure on delete pathV1 but pathV2 still success. => pathV2 deleted but pathV1, mailbox (id1/path1) still remain.
      • create a new mailbox with exact name (id2/path1) -> at this stage we have id1/path1 and id2/path1 on mailbox, id1/path1 on pathV1 and id2/path1 on pathV2.

      DOD

      tests show that there're inconsistencies after creating or deleting a mailbox. They should be located in CassandraMailboxManagerTest

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rcordier René Cordier
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: