chibenwa commented on code in PR #1758: URL: https://github.com/apache/james-project/pull/1758#discussion_r1374199696
########## server/mailet/integration-testing/src/test/java/org/apache/james/mailets/ForwardIntegrationTest.java: ########## @@ -323,19 +323,13 @@ void forwardShouldSplitLocalCopy() throws Exception { .authenticate(FROM, PASSWORD) .sendMessage(FROM, BOB.asString()); - Awaitility.await().until(() -> mailRepositoryProbe.getRepositoryMailCount(CUSTOM_REPOSITORY) == 2L); + Awaitility.await().until(() -> mailRepositoryProbe.getRepositoryMailCount(CUSTOM_REPOSITORY) == 1L); SoftAssertions.assertSoftly(Throwing.consumer(softly -> { Mail forwardedMail = mailRepositoryProbe.listMails(CUSTOM_REPOSITORY) - .filter(Throwing.predicate(mail -> mail.getRecipients().contains(DELPHINE.asMailAddress()))) .findAny().get(); - Mail localCopy = mailRepositoryProbe.listMails(CUSTOM_REPOSITORY) - .filter(Throwing.predicate(mail -> mail.getRecipients().contains(BOB.asMailAddress()))) - .findAny().get(); - softly.assertThat(forwardedMail.getRecipients()).containsOnly(DELPHINE.asMailAddress()); + softly.assertThat(forwardedMail.getRecipients()).containsOnly(DELPHINE.asMailAddress(), BOB.asMailAddress()); softly.assertThat(forwardedMail.getMaybeSender().asOptional()).contains(BOB.asMailAddress()); - softly.assertThat(localCopy.getRecipients()).containsOnly(BOB.asMailAddress()); - softly.assertThat(localCopy.getMaybeSender().asOptional()).contains(new MailAddress(FROM)); })); Review Comment: > when Bob see the mail, the sender is him. does it make sense? You confuse envelope and headers -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org For additional commands, e-mail: notifications-h...@james.apache.org