You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2021/09/08 03:11:39 UTC
[james-project] branch master updated (1050fa3 -> 330622d)
This is an automated email from the ASF dual-hosted git repository.
btellier pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git.
from 1050fa3 Merge pull request #635 JAMES-2278 Fix the IMAP QRESYNC "out of bound" issue
new a6517a3 MAILBOX-407 listShouldReturnEmptyListWhenNoMailboxes fails with NPE
new 330622d MAILBOX-406 Maildir: Some mailbox names are failing
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../DomainUserMaildirMailboxManagerTest.java | 61 +++++++++++++++++++++-
1 file changed, 60 insertions(+), 1 deletion(-)
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
[james-project] 01/02: MAILBOX-407
listShouldReturnEmptyListWhenNoMailboxes fails with NPE
Posted by bt...@apache.org.
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 a6517a353561b2639b572d001791112d119b44f8
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Sun Sep 5 19:37:42 2021 +0700
MAILBOX-407 listShouldReturnEmptyListWhenNoMailboxes fails with NPE
---
.../james/mailbox/maildir/DomainUserMaildirMailboxManagerTest.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/DomainUserMaildirMailboxManagerTest.java b/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/DomainUserMaildirMailboxManagerTest.java
index 55ae598..ec70563 100644
--- a/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/DomainUserMaildirMailboxManagerTest.java
+++ b/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/DomainUserMaildirMailboxManagerTest.java
@@ -46,6 +46,11 @@ class DomainUserMaildirMailboxManagerTest extends MailboxManagerTest<StoreMailbo
protected void renameMailboxShouldChangeTheMailboxPathOfAMailbox() {
}
+ @Disabled("MAILBOX-407 Returns a NPE")
+ @Test
+ protected void listShouldReturnEmptyListWhenNoMailboxes() {
+ }
+
@Disabled("MAILBOX-389 Mailbox rename fails with Maildir")
@Test
protected void renameMailboxByIdShouldChangeTheMailboxPathOfAMailbox() {
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
[james-project] 02/02: MAILBOX-406 Maildir: Some mailbox names are
failing
Posted by bt...@apache.org.
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 330622d759b0d6fff656ead348649404b6daad4f
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Sun Sep 5 19:38:00 2021 +0700
MAILBOX-406 Maildir: Some mailbox names are failing
---
.../DomainUserMaildirMailboxManagerTest.java | 56 +++++++++++++++++++++-
1 file changed, 55 insertions(+), 1 deletion(-)
diff --git a/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/DomainUserMaildirMailboxManagerTest.java b/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/DomainUserMaildirMailboxManagerTest.java
index ec70563..817400a 100644
--- a/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/DomainUserMaildirMailboxManagerTest.java
+++ b/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/DomainUserMaildirMailboxManagerTest.java
@@ -18,12 +18,22 @@
****************************************************************/
package org.apache.james.mailbox.maildir;
+import static org.assertj.core.api.Assertions.assertThatCode;
+
+import java.io.File;
import java.util.Optional;
+import java.util.UUID;
+
+import javax.mail.util.SharedByteArrayInputStream;
import org.apache.james.events.EventBus;
import org.apache.james.junit.TemporaryFolderExtension;
import org.apache.james.mailbox.MailboxManagerTest;
+import org.apache.james.mailbox.MailboxSession;
+import org.apache.james.mailbox.MessageManager;
import org.apache.james.mailbox.SubscriptionManager;
+import org.apache.james.mailbox.model.MailboxPath;
+import org.apache.james.mailbox.model.MessageRange;
import org.apache.james.mailbox.store.StoreMailboxManager;
import org.apache.james.mailbox.store.StoreSubscriptionManager;
import org.junit.jupiter.api.Disabled;
@@ -31,6 +41,8 @@ import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
+import reactor.core.publisher.Flux;
+
class DomainUserMaildirMailboxManagerTest extends MailboxManagerTest<StoreMailboxManager> {
@Disabled("Maildir is using DefaultMessageId which doesn't support full feature of a messageId, which is an essential" +
@@ -41,6 +53,48 @@ class DomainUserMaildirMailboxManagerTest extends MailboxManagerTest<StoreMailbo
@Nested
class BasicFeaturesTests extends MailboxManagerTest<StoreMailboxManager>.BasicFeaturesTests {
+ @Disabled("MAILBOX-406 mailbox creation fails")
+ @Test
+ void namingAMailboxJamesUidValidityFails() throws Exception {
+ MailboxSession session1 = mailboxManager.get().createSystemSession(USER_1);
+
+ mailboxManager.get().createMailbox(MailboxPath.forUser(session1.getUser(), "tmp"), session1);
+ mailboxManager.get().getMailbox(MailboxPath.forUser(session1.getUser(), "tmp"), session1)
+ .appendMessage(MessageManager.AppendCommand.from(new SharedByteArrayInputStream("PWND".getBytes())), session1);
+
+ assertThatCode(() -> mailboxManager.get().createMailbox(MailboxPath.forUser(session1.getUser(), "tmp/james-uidvalidity"), session1))
+ .doesNotThrowAnyException();
+ }
+
+ @Disabled("MAILBOX-406 mailbox creation fails")
+ @Test
+ void namingAMailboxJamesUidListFails() throws Exception {
+ MailboxSession session1 = mailboxManager.get().createSystemSession(USER_1);
+
+ mailboxManager.get().createMailbox(MailboxPath.forUser(session1.getUser(), "tmp"), session1);
+ mailboxManager.get().getMailbox(MailboxPath.forUser(session1.getUser(), "tmp"), session1)
+ .appendMessage(MessageManager.AppendCommand.from(new SharedByteArrayInputStream("PWND".getBytes())), session1);
+
+ assertThatCode(() -> mailboxManager.get().createMailbox(MailboxPath.forUser(session1.getUser(), "tmp/james-uidlist"), session1))
+ .doesNotThrowAnyException();
+ }
+
+ @Disabled("MAILBOX-406 listing emails fails")
+ @Test
+ void namingAMailboxJamesUidAclMakesReadingOtherMailboxFailing() throws Exception {
+ MailboxSession session1 = mailboxManager.get().createSystemSession(USER_1);
+
+ mailboxManager.get().createMailbox(MailboxPath.forUser(session1.getUser(), "tmp"), session1);
+ mailboxManager.get().getMailbox(MailboxPath.forUser(session1.getUser(), "tmp"), session1)
+ .appendMessage(MessageManager.AppendCommand.from(new SharedByteArrayInputStream("PWND".getBytes())), session1);
+
+ mailboxManager.get().createMailbox(MailboxPath.forUser(session1.getUser(), "tmp/james-acl"), session1);
+
+ assertThatCode(() -> Flux.from(mailboxManager.get().getMailbox(MailboxPath.forUser(session1.getUser(), "tmp"), session1)
+ .listMessagesMetadata(MessageRange.all(), session1)).blockLast())
+ .doesNotThrowAnyException();
+ }
+
@Disabled("MAILBOX-389 Mailbox rename fails with Maildir")
@Test
protected void renameMailboxShouldChangeTheMailboxPathOfAMailbox() {
@@ -114,7 +168,7 @@ class DomainUserMaildirMailboxManagerTest extends MailboxManagerTest<StoreMailbo
private StoreMailboxManager createMailboxManager() {
try {
- return MaildirMailboxManagerProvider.createMailboxManager("/%fulluser", temporaryFolder.getTemporaryFolder().getTempDir());
+ return MaildirMailboxManagerProvider.createMailboxManager("/%fulluser", new File(System.getProperty("java.io.tmpdir") + "/" + UUID.randomUUID()));
} catch (Exception e) {
throw new RuntimeException(e);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org