Repository: james-project
Updated Branches:
  refs/heads/master a999bd604 -> 9d3211cb5


JAMES-2457 Avoid costly concatenation when testing JMAP big mail handling


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/397dd788
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/397dd788
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/397dd788

Branch: refs/heads/master
Commit: 397dd788762094d2f7e7ad09b6f120af1e51e7b7
Parents: 826b00b
Author: Benoit Tellier <[email protected]>
Authored: Fri Aug 24 09:09:18 2018 +0000
Committer: Benoit Tellier <[email protected]>
Committed: Mon Aug 27 02:38:55 2018 +0000

----------------------------------------------------------------------
 .../jmap/methods/integration/SetMessagesMethodTest.java   | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/397dd788/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 deb4245..28b42d9 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
@@ -1360,7 +1360,8 @@ public abstract class SetMessagesMethodTest {
         String fromAddress = USERNAME;
         String body = Strings.repeat("d", BIG_MESSAGE_SIZE);
         {
-            String requestBody = "[" +
+            String requestBody = new StringBuilder(BIG_MESSAGE_SIZE + 10 * 
1024)
+                .append("[" +
                 "  [" +
                 "    \"setMessages\"," +
                 "    {" +
@@ -1368,13 +1369,16 @@ public abstract class SetMessagesMethodTest {
                 "        \"from\": { \"name\": \"Me\", \"email\": \"" + 
fromAddress + "\"}," +
                 "        \"to\": [{ \"name\": \"Me\", \"email\": \"" + 
fromAddress + "\"}]," +
                 "        \"subject\": \"Thank you for joining example.com!\"," 
+
-                "        \"textBody\": \"" + body + "\"," +
+                "        \"textBody\": \"")
+                .append(body)
+                .append("\"," +
                 "        \"mailboxIds\": [\"" + getOutboxId(accessToken) + 
"\"]" +
                 "      }}" +
                 "    }," +
                 "    \"#0\"" +
                 "  ]" +
-                "]";
+                "]")
+                .toString();
 
             given()
                 .header("Authorization", accessToken.serialize())


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

Reply via email to