[ 
https://issues.apache.org/jira/browse/JAMES-3056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17036708#comment-17036708
 ] 

Benoit Tellier commented on JAMES-3056:
---------------------------------------

https://github.com/linagora/james-project/pull/3100 contributed tests at the 
mapper level

> Unit tests for mailbox inconsitencies
> -------------------------------------
>
>                 Key: JAMES-3056
>                 URL: https://issues.apache.org/jira/browse/JAMES-3056
>             Project: James Server
>          Issue Type: Improvement
>          Components: mailbox
>            Reporter: René Cordier
>            Priority: Major
>
> *Circumstances*
> - mailboxPath exists but not the mailbox
> - mailbox exists but not the mailboxPath
> - if mailbox has id1/path1 and id2/path1 but mailboxPath only have id1/path1 
> (GhostMailbox)
> - mailbox renames 
> https://ci.linagora.com/linagora/lgs/openpaas/james/issues/1586#note_246053
> *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



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to