JAMES-1869 MPT testing with Inmemory should be success with long mailbox name
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/eb9b24cf Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/eb9b24cf Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/eb9b24cf Branch: refs/heads/master Commit: eb9b24cf8d7362ca4b1ced9e254881a9a9f457e3 Parents: 19604d2 Author: Quynh Nguyen <[email protected]> Authored: Tue Jan 24 13:41:35 2017 +0700 Committer: Antoine Duprat <[email protected]> Committed: Thu Jan 26 12:58:22 2017 +0100 ---------------------------------------------------------------------- .../mpt/helper/ByteBufferOutputStream.java | 2 +- .../suite/MailboxWithLongNameSuccess.java | 43 + .../mpt/imapmailbox/suite/SelectedInbox.java | 2 +- .../imap/scripts/CreateSuccessWithLongName.test | 822 +++++++++++++++++++ .../inmemory/InMemoryMailboxTest.java | 49 ++ 5 files changed, 916 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/james-project/blob/eb9b24cf/mpt/core/src/main/java/org/apache/james/mpt/helper/ByteBufferOutputStream.java ---------------------------------------------------------------------- diff --git a/mpt/core/src/main/java/org/apache/james/mpt/helper/ByteBufferOutputStream.java b/mpt/core/src/main/java/org/apache/james/mpt/helper/ByteBufferOutputStream.java index e41e405..cc99c9a 100644 --- a/mpt/core/src/main/java/org/apache/james/mpt/helper/ByteBufferOutputStream.java +++ b/mpt/core/src/main/java/org/apache/james/mpt/helper/ByteBufferOutputStream.java @@ -29,7 +29,7 @@ import java.nio.charset.Charset; public class ByteBufferOutputStream extends OutputStream { - private final ByteBuffer buffer = ByteBuffer.allocate(65536); + private final ByteBuffer buffer = ByteBuffer.allocate(160384); private final Charset ascii = Charset.forName("ASCII"); private final Continuation continuation; private boolean matchPlus = false; http://git-wip-us.apache.org/repos/asf/james-project/blob/eb9b24cf/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java ---------------------------------------------------------------------- diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java new file mode 100644 index 0000000..1ec3907 --- /dev/null +++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java @@ -0,0 +1,43 @@ +/**************************************************************** + * Licensed to the Apache Software Foundation (ASF) under one * + * or more contributor license agreements. See the NOTICE file * + * distributed with this work for additional information * + * regarding copyright ownership. The ASF licenses this file * + * to you under the Apache License, Version 2.0 (the * + * "License"); you may not use this file except in compliance * + * with the License. You may obtain a copy of the License at * + * * + * http://www.apache.org/licenses/LICENSE-2.0 * + * * + * Unless required by applicable law or agreed to in writing, * + * software distributed under the License is distributed on an * + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * + * KIND, either express or implied. See the License for the * + * specific language governing permissions and limitations * + * under the License. * + ****************************************************************/ + +package org.apache.james.mpt.imapmailbox.suite; + +import java.util.Locale; + +import javax.inject.Inject; + +import org.apache.james.mpt.api.HostSystem; +import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedInbox; +import org.junit.Test; + +public class MailboxWithLongNameSuccess extends BaseSelectedInbox { + @Inject + private static HostSystem system; + + public MailboxWithLongNameSuccess() throws Exception { + super(system); + } + + @Test + public void testWithLongMailboxNameUS() throws Exception { + scriptTest("CreateSuccessWithLongName", Locale.US); + } + +} http://git-wip-us.apache.org/repos/asf/james-project/blob/eb9b24cf/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.java ---------------------------------------------------------------------- diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.java index c76d4be..1bddd69 100644 --- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.java +++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.java @@ -130,7 +130,7 @@ public class SelectedInbox extends BaseSelectedInbox { public void testCreateITALY() throws Exception { scriptTest("Create", Locale.ITALY); } - + @Test public void testExamineEmptyITALY() throws Exception { scriptTest("ExamineEmpty", Locale.ITALY); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
