MAILBOX-355 SetMessagesMethodTest should rely on MailboxId
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/387861af Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/387861af Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/387861af Branch: refs/heads/master Commit: 387861af615b87885eadd710b978d11aa6f160f4 Parents: e877c0b Author: Benoit Tellier <btell...@linagora.com> Authored: Tue Dec 4 14:35:58 2018 +0700 Committer: Benoit Tellier <btell...@linagora.com> Committed: Wed Dec 5 16:34:24 2018 +0700 ---------------------------------------------------------------------- .../james/jmap/methods/integration/SetMessagesMethodTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/james-project/blob/387861af/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java index a4c3b70..ff955e3 100644 --- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java +++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java @@ -2334,15 +2334,15 @@ public abstract class SetMessagesMethodTest { calmlyAwait.atMost(5, TimeUnit.SECONDS).until(() -> events.stream() - .anyMatch(event -> isAddedToOutboxEvent(messageId, event))); + .anyMatch(event -> isAddedToOutboxEvent(messageId, event, outboxId))); } - private boolean isAddedToOutboxEvent(String messageId, Event event) { + private boolean isAddedToOutboxEvent(String messageId, Event event, String outboxId) { if (!(event instanceof EventFactory.AddedImpl)) { return false; } EventFactory.AddedImpl added = (EventFactory.AddedImpl) event; - return added.getMailboxPath().equals(MailboxPath.forUser(USERNAME, DefaultMailboxes.OUTBOX)) + return added.getMailboxId().serialize().equals(outboxId) && added.getUids().size() == 1 && added.getMetaData(added.getUids().get(0)).getMessageId().serialize().equals(messageId); } --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org