This is an automated email from the ASF dual-hosted git repository. btellier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 9a48d6920ac7de32e4890d3f68336e26409537e7 Author: Matthieu Baechler <[email protected]> AuthorDate: Fri Dec 6 08:55:44 2019 +0100 [JAMES-3001] remove useless calls in tests scenarios --- .../methods/integration/SpamAssassinContract.java | 27 +--------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/server/protocols/jmap-draft-integration-testing/jmap-draft-integration-testing-common/src/test/java/org/apache/james/jmap/draft/methods/integration/SpamAssassinContract.java b/server/protocols/jmap-draft-integration-testing/jmap-draft-integration-testing-common/src/test/java/org/apache/james/jmap/draft/methods/integration/SpamAssassinContract.java index 453526a..1ff74ab 100644 --- a/server/protocols/jmap-draft-integration-testing/jmap-draft-integration-testing-common/src/test/java/org/apache/james/jmap/draft/methods/integration/SpamAssassinContract.java +++ b/server/protocols/jmap-draft-integration-testing/jmap-draft-integration-testing-common/src/test/java/org/apache/james/jmap/draft/methods/integration/SpamAssassinContract.java @@ -162,19 +162,7 @@ public interface SpamAssassinContract { .post("/jmap"); calmlyAwait.atMost(Duration.ONE_MINUTE).untilAsserted(() -> assertMessagesFoundInMailbox(aliceAccessToken, getInboxId(aliceAccessToken), 1)); - // Alice is moving this message to Spam -> learning in SpamAssassin - with() - .header("Authorization", aliceAccessToken.serialize()) - .body("[[\"getMessageList\", {\"filter\":{\"inMailboxes\":[\"" + getInboxId(aliceAccessToken) + "\"]}}, \"#0\"]]") - .when() - .post("/jmap") - .then() - .statusCode(200) - .body(NAME, equalTo("messageList")) - .body(ARGUMENTS + ".messageIds", hasSize(1)) - .extract() - .path(ARGUMENTS + ".messageIds"); - + // Alice is copying this message to Spam -> learning in SpamAssassin try (IMAPMessageReader imapMessageReader = new IMAPMessageReader()) { imapMessageReader.connect(LOCALHOST_IP, jamesServer.getProbe(ImapGuiceProbe.class).getImapPort()) .login(ALICE, ALICE_PASSWORD) @@ -210,19 +198,6 @@ public interface SpamAssassinContract { .post("/jmap"); calmlyAwait.atMost(Duration.ONE_MINUTE).untilAsserted(() -> assertMessagesFoundInMailbox(aliceAccessToken, getInboxId(aliceAccessToken), 1)); - // Alice is moving this message to Spam -> learning in SpamAssassin - with() - .header("Authorization", aliceAccessToken.serialize()) - .body("[[\"getMessageList\", {\"filter\":{\"inMailboxes\":[\"" + getInboxId(aliceAccessToken) + "\"]}}, \"#0\"]]") - .when() - .post("/jmap") - .then() - .statusCode(200) - .body(NAME, equalTo("messageList")) - .body(ARGUMENTS + ".messageIds", hasSize(1)) - .extract() - .path(ARGUMENTS + ".messageIds"); - try (IMAPMessageReader imapMessageReader = new IMAPMessageReader()) { imapMessageReader.connect(LOCALHOST_IP, jamesServer.getProbe(ImapGuiceProbe.class).getImapPort()) .login(ALICE, ALICE_PASSWORD) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
