Skip to content

Conversation

@chibenwa
Copy link
Member

Store events where used for two features:

  • Avoiding reading the mailbox from the store
  • Caching messages to save some reads

We need to rely on Mailbox API and read mailbox/messages from the MailboxFactory.

@chibenwa chibenwa added this to the Sprint 2 - Robusta beans milestone Dec 11, 2018
@chibenwa chibenwa self-assigned this Dec 11, 2018
@chibenwa
Copy link
Member Author

[e296c51ebb3b1b6c316497c7573008e6e29e3f30] [ERROR]   SpamAssassinListenerTest.eventShouldCallSpamAssassinHamLearningWhenTheMessageIsAddedInInbox:259 
[e296c51ebb3b1b6c316497c7573008e6e29e3f30] Wanted but not invoked:
[e296c51ebb3b1b6c316497c7573008e6e29e3f30] spamAssassin.learnHam(<any>, <any>);
[e296c51ebb3b1b6c316497c7573008e6e29e3f30] -> at org.apache.james.mailbox.spamassassin.SpamAssassinListenerTest.eventShouldCallSpamAssassinHamLearningWhenTheMessageIsAddedInInbox(SpamAssassinListenerTest.java:259)
[e296c51ebb3b1b6c316497c7573008e6e29e3f30] Actually, there were zero interactions with this mock.

In ListeningMessageSearchIndex, in ElasticSearchListeningMessageSearchIndexTest
and remove an unused import in ElasticSearchIndexerTest.

These class will be removed later on.
Specific implementation details are never accessed
This allows relying on the MailboxSessionMapperFactory for retrieving mailboxes, which
are not part of the core mailbox API
This method is not part of the mailbox-api and messages will not be carried along
in distributed events.

AddedImpl no longer need to carry along cached messages.
…tion details to retrieve the mailbox

We should rather read it from the mailbox store
This avoids a direct reference to the specific "store" objects
We now need the messages to be persisted as they are not carried along.

Also, we need to re-create mappers to isolate tests between each others.
This host system was using two distinct Mapper factories. This causes some
 failures while retrieving mailboxes in the ElasticSearch indexer
@chibenwa
Copy link
Member Author

Merged

@chibenwa chibenwa closed this Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants