[2/2] james-project git commit: Merge remote-tracking branch 'lduzan/JAMES-2093_attachment_remove_in_clause'

2017-07-07 Thread aduprat
Merge remote-tracking branch 'lduzan/JAMES-2093_attachment_remove_in_clause'


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

Branch: refs/heads/master
Commit: f2cca215c7b0a3b95506de1c2a28e3a377abf758
Parents: 1e19c15 2c0c5f0
Author: Antoine Duprat 
Authored: Fri Jul 7 10:22:38 2017 +0200
Committer: Antoine Duprat 
Committed: Fri Jul 7 10:22:38 2017 +0200

--
 .../mail/CassandraAttachmentMapper.java | 44 +++-
 1 file changed, 25 insertions(+), 19 deletions(-)
--



-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[1/2] james-project git commit: JAMES-2093 remove in clause from AttachmentMapper

2017-07-07 Thread aduprat
Repository: james-project
Updated Branches:
  refs/heads/master 1e19c150b -> f2cca215c


JAMES-2093 remove in clause from AttachmentMapper


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

Branch: refs/heads/master
Commit: 2c0c5f000e3e4167efaefd9c13345ae28a13b7b8
Parents: 1128983
Author: Luc DUZAN 
Authored: Thu Jul 6 12:11:38 2017 +0200
Committer: Luc DUZAN 
Committed: Thu Jul 6 12:11:38 2017 +0200

--
 .../mail/CassandraAttachmentMapper.java | 44 +++-
 1 file changed, 25 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/2c0c5f00/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraAttachmentMapper.java
--
diff --git 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraAttachmentMapper.java
 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraAttachmentMapper.java
index cc295ec..61edbba 100644
--- 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraAttachmentMapper.java
+++ 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraAttachmentMapper.java
@@ -20,7 +20,6 @@
 package org.apache.james.mailbox.cassandra.mail;
 
 import static com.datastax.driver.core.querybuilder.QueryBuilder.eq;
-import static com.datastax.driver.core.querybuilder.QueryBuilder.in;
 import static com.datastax.driver.core.querybuilder.QueryBuilder.insertInto;
 import static com.datastax.driver.core.querybuilder.QueryBuilder.select;
 import static 
org.apache.james.mailbox.cassandra.table.CassandraAttachmentTable.FIELDS;
@@ -34,7 +33,9 @@ import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.util.Collection;
 import java.util.List;
+import java.util.Optional;
 import java.util.concurrent.CompletableFuture;
+import java.util.stream.Stream;
 
 import org.apache.commons.io.IOUtils;
 import org.apache.james.backends.cassandra.utils.CassandraAsyncExecutor;
@@ -43,16 +44,15 @@ import org.apache.james.mailbox.exception.MailboxException;
 import org.apache.james.mailbox.model.Attachment;
 import org.apache.james.mailbox.model.AttachmentId;
 import org.apache.james.mailbox.store.mail.AttachmentMapper;
+import org.apache.james.util.FluentFutureStream;
 
-import com.datastax.driver.core.ResultSet;
 import com.datastax.driver.core.Row;
 import com.datastax.driver.core.Session;
 import com.github.fge.lambdas.Throwing;
 import com.github.fge.lambdas.ThrownByLambdaException;
 import com.github.steveash.guavate.Guavate;
 import com.google.common.base.Preconditions;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableList.Builder;
+import org.apache.james.util.OptionalConverter;
 
 public class CassandraAttachmentMapper implements AttachmentMapper {
 
@@ -98,23 +98,29 @@ public class CassandraAttachmentMapper implements 
AttachmentMapper {
 
 public CompletableFuture 
getAttachmentsAsFuture(Collection attachmentIds) {
 Preconditions.checkArgument(attachmentIds != null);
-if (attachmentIds.isEmpty()) {
-return CompletableFuture.completedFuture(ImmutableList.of());
-}
-List ids = attachmentIds.stream()
-.map(AttachmentId::getId)
-.collect(Guavate.toImmutableList());
-return cassandraAsyncExecutor.execute(
-select(FIELDS)
-.from(TABLE_NAME)
-.where(in(ID, ids)))
-.thenApply(this::attachments);
+
+Stream> attachments = 
attachmentIds
+.stream()
+.distinct()
+.map(this::getAttachmentAsFuture);
+
+return FluentFutureStream
+.of(attachments)
+.flatMap(OptionalConverter::toStream)
+.completableFuture()
+.thenApply(stream ->
+stream.collect(Guavate.toImmutableList()));
 }
 
-private List attachments(ResultSet resultSet) {
-Builder builder = ImmutableList. builder();
-resultSet.forEach(row -> builder.add(attachment(row)));
-return builder.build();
+private CompletableFuture 
getAttachmentAsFuture(AttachmentId attachmentId) {
+String id = attachmentId.getId();
+
+return cassandraAsyncExecutor.executeSingleRow(
+select(FIELDS)
+.from(TABLE_NAME)
+.where(eq(ID, id)))
+.thenApply(optional ->
+ 

[07/21] james-project git commit: MPT-39 finally remove this crazy static injection with onami

2017-07-07 Thread aduprat
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTest.java
--
diff --git 
a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTest.java
 
b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTest.java
deleted file mode 100644
index a15614b..000
--- 
a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/
- * 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.inmemory;
-
-import org.apache.james.mpt.imapmailbox.suite.AuthenticatedState;
-import org.apache.james.mpt.imapmailbox.suite.ConcurrentSessions;
-import org.apache.james.mpt.imapmailbox.suite.Events;
-import org.apache.james.mpt.imapmailbox.suite.Expunge;
-import org.apache.james.mpt.imapmailbox.suite.Fetch;
-import org.apache.james.mpt.imapmailbox.suite.FetchBodySection;
-import org.apache.james.mpt.imapmailbox.suite.FetchBodyStructure;
-import org.apache.james.mpt.imapmailbox.suite.FetchHeaders;
-import org.apache.james.mpt.imapmailbox.suite.Listing;
-import org.apache.james.mpt.imapmailbox.suite.NonAuthenticatedState;
-import org.apache.james.mpt.imapmailbox.suite.PartialFetch;
-import org.apache.james.mpt.imapmailbox.suite.QuotaTest;
-import org.apache.james.mpt.imapmailbox.suite.Rename;
-import org.apache.james.mpt.imapmailbox.suite.Search;
-import org.apache.james.mpt.imapmailbox.suite.Security;
-import org.apache.james.mpt.imapmailbox.suite.Select;
-import org.apache.james.mpt.imapmailbox.suite.SelectedInbox;
-import org.apache.james.mpt.imapmailbox.suite.SelectedState;
-import org.apache.james.mpt.imapmailbox.suite.UidSearch;
-import org.apache.james.mpt.onami.test.OnamiSuite;
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-@RunWith(OnamiSuite.class)
-@Suite.SuiteClasses({
-AuthenticatedState.class,
-ConcurrentSessions.class,
-Events.class,
-Expunge.class,
-Fetch.class,
-FetchBodySection.class,
-FetchBodyStructure.class,
-FetchHeaders.class,
-Listing.class,
-NonAuthenticatedState.class,
-PartialFetch.class,
-Rename.class,
-Search.class,
-Security.class,
-Select.class,
-SelectedInbox.class,
-SelectedState.class,
-UidSearch.class,
-QuotaTest.class
-})
-@GuiceModules({ InMemoryMailboxTestModule.class })
-public class InMemoryMailboxEventAsynchronousTest {
-
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTestModule.java
--
diff --git 
a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTestModule.java
 
b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTestModule.java
deleted file mode 100644
index ea55f7d..000
--- 
a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTestModule.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional 

[03/21] james-project git commit: MPT-39 finally remove this crazy static injection with onami

2017-07-07 Thread aduprat
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/GuiceProvidedModules.java
--
diff --git 
a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/GuiceProvidedModules.java
 
b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/GuiceProvidedModules.java
deleted file mode 100644
index 1213142..000
--- 
a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/GuiceProvidedModules.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/
- * 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.onami.test.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * 
- * Annotate a public static method to create a Google Guice {@link 
com.google.inject.Module} provider.
- * 
- * 
- * The method return type must be one of:
- * 
- * com.google.inject.Module
- * Iterablecom.google.inject.Module
- * com.google.inject.Module[]
- * 
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.METHOD)
-public @interface GuiceProvidedModules {
-
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/Mock.java
--
diff --git 
a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/Mock.java
 
b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/Mock.java
deleted file mode 100644
index d2e32fa..000
--- 
a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/Mock.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/
- * 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.onami.test.annotation;
-
-import java.lang.annotation.Annotation;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Annotate your filed into which {@link 
org.apache.onami.test.GuiceMockModule} will create and inject the mock object.
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.FIELD)
-@Inherited
-public @interface Mock {
-
-/**
- * Annotation class used to mark that no annotation binding is defined.
- */
-public static @interface NoAnnotation {
-}
-
-/**
- * Indicates if this mock object has to be resetted after 

[15/21] james-project git commit: MPT-39 Reference Apache issue tracking in source code

2017-07-07 Thread aduprat
MPT-39 Reference Apache issue tracking in source code


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

Branch: refs/heads/master
Commit: 17ee848989f19c2d334bf8767e02d78ed198c806
Parents: ae33676
Author: benwa 
Authored: Fri Jun 23 10:34:53 2017 +0700
Committer: Matthieu Baechler 
Committed: Thu Jul 6 10:32:18 2017 -0400

--
 .../java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/17ee8489/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java
--
diff --git 
a/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java
 
b/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java
index 23f474d..afe14d9 100644
--- 
a/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java
+++ 
b/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java
@@ -20,7 +20,7 @@ package org.apache.james.mpt.imapmailbox.jcr;
 
 import org.junit.Ignore;
 
-@Ignore("JWC-130 : JCR mailbox does not correctly release resources + append 
problems")
+@Ignore("MPT-7 : JCR mailbox does not correctly release resources + append 
problems")
 public class JcrMailboxTest {
 
 }


-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[09/21] james-project git commit: MPT-39 finally remove this crazy static injection with onami

2017-07-07 Thread aduprat
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/AbstractMailboxTest.java
--
diff --git 
a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/AbstractMailboxTest.java
 
b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/AbstractMailboxTest.java
deleted file mode 100644
index 96b65e6..000
--- 
a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/AbstractMailboxTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/
- * 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;
-
-import org.apache.james.mpt.imapmailbox.suite.AuthenticatedState;
-import org.apache.james.mpt.imapmailbox.suite.ConcurrentSessions;
-import org.apache.james.mpt.imapmailbox.suite.Copy;
-import org.apache.james.mpt.imapmailbox.suite.Events;
-import org.apache.james.mpt.imapmailbox.suite.Expunge;
-import org.apache.james.mpt.imapmailbox.suite.Fetch;
-import org.apache.james.mpt.imapmailbox.suite.FetchBodySection;
-import org.apache.james.mpt.imapmailbox.suite.FetchBodyStructure;
-import org.apache.james.mpt.imapmailbox.suite.FetchHeaders;
-import org.apache.james.mpt.imapmailbox.suite.Listing;
-import org.apache.james.mpt.imapmailbox.suite.MailboxAnnotation;
-import org.apache.james.mpt.imapmailbox.suite.Move;
-import org.apache.james.mpt.imapmailbox.suite.NonAuthenticatedState;
-import org.apache.james.mpt.imapmailbox.suite.PartialFetch;
-import org.apache.james.mpt.imapmailbox.suite.QuotaTest;
-import org.apache.james.mpt.imapmailbox.suite.Rename;
-import org.apache.james.mpt.imapmailbox.suite.Search;
-import org.apache.james.mpt.imapmailbox.suite.Security;
-import org.apache.james.mpt.imapmailbox.suite.Select;
-import org.apache.james.mpt.imapmailbox.suite.SelectedInbox;
-import org.apache.james.mpt.imapmailbox.suite.SelectedState;
-import org.apache.james.mpt.imapmailbox.suite.UidSearch;
-import org.apache.james.mpt.imapmailbox.suite.UserFlagsSupport;
-import org.apache.james.mpt.onami.test.OnamiSuite;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite.SuiteClasses;
-
-@RunWith(OnamiSuite.class)
-@SuiteClasses({ 
-AuthenticatedState.class,
-ConcurrentSessions.class,
-Copy.class,
-Events.class,
-Expunge.class,
-Fetch.class,
-FetchBodySection.class,
-FetchBodyStructure.class,
-FetchHeaders.class,
-Listing.class,
-NonAuthenticatedState.class,
-PartialFetch.class,
-Rename.class,
-Search.class,
-Security.class,
-Select.class,
-QuotaTest.class,
-UserFlagsSupport.class,
-Move.class,
-SelectedInbox.class,
-SelectedState.class,
-UidSearch.class,
-MailboxAnnotation.class
-})
-public abstract class AbstractMailboxTest {
-
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLCommands.java
--
diff --git 
a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLCommands.java
 
b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLCommands.java
index 2fd93d2..5768825 100644
--- 
a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLCommands.java
+++ 
b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLCommands.java
@@ -21,83 +21,85 @@ package org.apache.james.mpt.imapmailbox.suite;
 
 import java.util.Locale;
 
-import javax.inject.Inject;
-
 import org.apache.james.mailbox.model.MailboxACL;
 import org.apache.james.mailbox.model.MailboxPath;
 import 

[05/21] james-project git commit: MPT-39 finally remove this crazy static injection with onami

2017-07-07 Thread aduprat
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraAuthenticateTest.java
--
diff --git 
a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraAuthenticateTest.java
 
b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraAuthenticateTest.java
new file mode 100644
index 000..8232ecd
--- /dev/null
+++ 
b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraAuthenticateTest.java
@@ -0,0 +1,51 @@
+/
+ * 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.managesieve.cassandra;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.AuthenticateTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraAuthenticateTest extends AuthenticateTest {
+
+private ManageSieveHostSystem system;
+
+@Before
+public void setUp() throws Exception {
+Injector injector = Guice.createInjector(new CassandraModule());
+system = injector.getInstance(ManageSieveHostSystem.class);
+system.beforeTest();
+super.setUp();
+}
+
+@Override
+protected ManageSieveHostSystem createManageSieveHostSystem() {
+return system;
+}
+
+@After
+public void tearDown() throws Exception {
+system.afterTest();
+}
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraCapabilityTest.java
--
diff --git 
a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraCapabilityTest.java
 
b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraCapabilityTest.java
new file mode 100644
index 000..f66278f
--- /dev/null
+++ 
b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraCapabilityTest.java
@@ -0,0 +1,51 @@
+/
+ * 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.managesieve.cassandra;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.CapabilityTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import 

[18/21] james-project git commit: MPT-39 Add missing licenses in MPT

2017-07-07 Thread aduprat
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryQuotaTest.java
--
diff --git 
a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryQuotaTest.java
 
b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryQuotaTest.java
index 16f0945..193a0ed 100644
--- 
a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryQuotaTest.java
+++ 
b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryQuotaTest.java
@@ -1,3 +1,22 @@
+/
+ * 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.inmemory;
 
 import org.apache.james.mpt.api.ImapHostSystem;

http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryRename.java
--
diff --git 
a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryRename.java
 
b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryRename.java
index dff16d6..79f0b74 100644
--- 
a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryRename.java
+++ 
b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryRename.java
@@ -1,3 +1,22 @@
+/
+ * 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.inmemory;
 
 import org.apache.james.mpt.api.ImapHostSystem;

http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySearch.java
--
diff --git 
a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySearch.java
 
b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySearch.java
index ca51c25..d5dda8c 100644
--- 
a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySearch.java
+++ 
b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySearch.java
@@ -1,3 +1,22 @@
+/
+ * Licensed to the Apache 

svn commit: r20358 - /release/james/server/3.0.0/

2017-07-07 Thread btellier
Author: btellier
Date: Fri Jul  7 09:11:16 2017
New Revision: 20358

Log:
Uploading corrected artifact for James 3.0.0

Modified:
release/james/server/3.0.0/james-server-app-3.0.0-app.zip
release/james/server/3.0.0/james-server-app-3.0.0-app.zip.md5
release/james/server/3.0.0/james-server-app-3.0.0-app.zip.md5.sig
release/james/server/3.0.0/james-server-app-3.0.0-app.zip.sha1
release/james/server/3.0.0/james-server-app-3.0.0-app.zip.sha1.sig
release/james/server/3.0.0/james-server-app-3.0.0-app.zip.sig

Modified: release/james/server/3.0.0/james-server-app-3.0.0-app.zip
==
Binary files - no diff available.

Modified: release/james/server/3.0.0/james-server-app-3.0.0-app.zip.md5
==
--- release/james/server/3.0.0/james-server-app-3.0.0-app.zip.md5 (original)
+++ release/james/server/3.0.0/james-server-app-3.0.0-app.zip.md5 Fri Jul  7 
09:11:16 2017
@@ -1 +1 @@
-4d842aa7d8141b498b338ddb2d983dcb  james-server-app-3.0.0-app.zip
+062cb76e3fabc6746908de0c6d49c014  james-server-app-3.0.0-app.zip

Modified: release/james/server/3.0.0/james-server-app-3.0.0-app.zip.md5.sig
==
Binary files - no diff available.

Modified: release/james/server/3.0.0/james-server-app-3.0.0-app.zip.sha1
==
--- release/james/server/3.0.0/james-server-app-3.0.0-app.zip.sha1 (original)
+++ release/james/server/3.0.0/james-server-app-3.0.0-app.zip.sha1 Fri Jul  7 
09:11:16 2017
@@ -1 +1 @@
-0485273947a45dd0aeba51b6f5164e255ebffa22  james-server-app-3.0.0-app.zip
+e5420472c7d09954b8eeedff43153e9b3a9e18aa  james-server-app-3.0.0-app.zip

Modified: release/james/server/3.0.0/james-server-app-3.0.0-app.zip.sha1.sig
==
Binary files - no diff available.

Modified: release/james/server/3.0.0/james-server-app-3.0.0-app.zip.sig
==
Binary files - no diff available.



-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[21/21] james-project git commit: Merge remote-tracking branch 'mbaechler/MPT-39'

2017-07-07 Thread aduprat
Merge remote-tracking branch 'mbaechler/MPT-39'


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

Branch: refs/heads/master
Commit: 3a70ae82d780e3ed76088d376cfeb60868bdc47a
Parents: f2cca21 fe60fec
Author: Antoine Duprat 
Authored: Fri Jul 7 10:23:48 2017 +0200
Committer: Antoine Duprat 
Committed: Fri Jul 7 10:23:48 2017 +0200

--
 .../org/apache/james/mpt/api/Continuation.java  |  19 +
 .../script/AbstractProtocolTestFramework.java   | 115 -
 .../AbstractSimpleScriptedTestProtocol.java | 111 -
 .../GenericSimpleScriptedTestProtocol.java  | 206 +
 .../mpt/script/ImapScriptedTestProtocol.java|  49 ++
 .../mpt/script/SimpleScriptedTestProtocol.java  |  11 +
 .../cassandra/CassandraAuthenticatePlain.java   |  51 +++
 .../cassandra/CassandraAuthenticatedState.java  |  51 +++
 .../cassandra/CassandraConcurrentSessions.java  |  51 +++
 .../cassandra/CassandraCondstore.java   |  51 +++
 .../imapmailbox/cassandra/CassandraCopy.java|  51 +++
 .../imapmailbox/cassandra/CassandraEvents.java  |  51 +++
 .../imapmailbox/cassandra/CassandraExpunge.java |  51 +++
 .../imapmailbox/cassandra/CassandraFetch.java   |  51 +++
 .../cassandra/CassandraFetchBodySection.java|  51 +++
 .../cassandra/CassandraFetchBodyStructure.java  |  51 +++
 .../cassandra/CassandraFetchHeaders.java|  51 +++
 .../imapmailbox/cassandra/CassandraListing.java |  51 +++
 .../cassandra/CassandraMailboxAnnotation.java   |  51 +++
 .../cassandra/CassandraMailboxTest.java |  79 
 .../cassandra/CassandraMailboxTestModule.java   |   6 +-
 .../CassandraMailboxWithLongNameError.java  |  51 +++
 .../imapmailbox/cassandra/CassandraMove.java|  51 +++
 .../CassandraNonAuthenticatedState.java |  51 +++
 .../cassandra/CassandraPartialFetch.java|  51 +++
 .../cassandra/CassandraQuotaTest.java   |  51 +++
 .../imapmailbox/cassandra/CassandraRename.java  |  51 +++
 .../imapmailbox/cassandra/CassandraSearch.java  |  51 +++
 .../cassandra/CassandraSecurity.java|  51 +++
 .../imapmailbox/cassandra/CassandraSelect.java  |  51 +++
 .../cassandra/CassandraSelectedInbox.java   |  51 +++
 .../cassandra/CassandraSelectedState.java   |  51 +++
 .../cassandra/CassandraUidSearch.java   |  51 +++
 .../cassandra/CassandraUidSearchOnIndex.java|  51 +++
 .../cassandra/CassandraUserFlagsSupport.java|  51 +++
 .../cassandra/host/CassandraHostSystem.java |  16 +-
 mpt/impl/imap-mailbox/core/pom.xml  |   4 -
 .../mpt/imapmailbox/AbstractMailboxTest.java|  76 
 .../mpt/imapmailbox/suite/ACLCommands.java  |  67 ++-
 .../mpt/imapmailbox/suite/ACLIntegration.java   | 233 ++
 .../suite/ACLScriptedTestProtocol.java  |  82 
 .../imapmailbox/suite/AuthenticatePlain.java|  49 +-
 .../imapmailbox/suite/AuthenticatedState.java   | 238 +++---
 .../imapmailbox/suite/ConcurrentSessions.java   | 120 +++--
 .../james/mpt/imapmailbox/suite/Condstore.java  |  32 +-
 .../james/mpt/imapmailbox/suite/Copy.java   |  32 +-
 .../imapmailbox/suite/DeploymentValidation.java |  32 +-
 .../james/mpt/imapmailbox/suite/Events.java |  40 +-
 .../james/mpt/imapmailbox/suite/Expunge.java|  42 +-
 .../james/mpt/imapmailbox/suite/Fetch.java  | 126 --
 .../mpt/imapmailbox/suite/FetchBodySection.java |  64 ++-
 .../imapmailbox/suite/FetchBodyStructure.java   |  76 +++-
 .../mpt/imapmailbox/suite/FetchHeaders.java |  52 ++-
 .../james/mpt/imapmailbox/suite/Listing.java|  50 +-
 .../imapmailbox/suite/MailboxAnnotation.java|  40 +-
 .../suite/MailboxWithLongNameError.java |  35 +-
 .../suite/MailboxWithLongNameSuccess.java   |  36 +-
 .../james/mpt/imapmailbox/suite/Move.java   |  36 +-
 .../suite/NonAuthenticatedState.java| 112 +++--
 .../mpt/imapmailbox/suite/PartialFetch.java |  78 +++-
 .../james/mpt/imapmailbox/suite/QuotaTest.java  |  43 +-
 .../james/mpt/imapmailbox/suite/Rename.java |  66 ++-
 .../james/mpt/imapmailbox/suite/Search.java |  53 ++-
 .../james/mpt/imapmailbox/suite/Security.java   | 112 +++--
 .../james/mpt/imapmailbox/suite/Select.java |  41 +-
 .../mpt/imapmailbox/suite/SelectedInbox.java| 198 +---
 .../mpt/imapmailbox/suite/SelectedState.java| 150 --
 .../james/mpt/imapmailbox/suite/UidSearch.java  |  51 ++-
 .../mpt/imapmailbox/suite/UidSearchOnIndex.java |  38 +-
 .../mpt/imapmailbox/suite/UserFlagsSupport.java |  34 +-
 .../suite/base/BaseAuthenticatedState.java  |  85 
 .../suite/base/BaseImapProtocol.java|  39 --
 

[04/21] james-project git commit: MPT-39 finally remove this crazy static injection with onami

2017-07-07 Thread aduprat
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileNoopTest.java
--
diff --git 
a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileNoopTest.java
 
b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileNoopTest.java
new file mode 100644
index 000..1dc4571
--- /dev/null
+++ 
b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileNoopTest.java
@@ -0,0 +1,51 @@
+/
+ * 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.managesieve.file;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.NoopTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class FileNoopTest extends NoopTest {
+
+private ManageSieveHostSystem system;
+
+@Before
+public void setUp() throws Exception {
+Injector injector = Guice.createInjector(new FileModule());
+system = injector.getInstance(ManageSieveHostSystem.class);
+system.beforeTest();
+super.setUp();
+}
+
+@Override
+protected ManageSieveHostSystem createManageSieveHostSystem() {
+return system;
+}
+
+@After
+public void tearDown() throws Exception {
+system.afterTest();
+}
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FilePutScriptTest.java
--
diff --git 
a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FilePutScriptTest.java
 
b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FilePutScriptTest.java
new file mode 100644
index 000..50a72bc
--- /dev/null
+++ 
b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FilePutScriptTest.java
@@ -0,0 +1,51 @@
+/
+ * 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.managesieve.file;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.PutScriptTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class FilePutScriptTest extends PutScriptTest {
+
+private ManageSieveHostSystem system;
+
+@Before
+public void setUp() throws Exception {
+Injector 

[10/21] james-project git commit: MPT-39 finally remove this crazy static injection with onami

2017-07-07 Thread aduprat
MPT-39 finally remove this crazy static injection with onami


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

Branch: refs/heads/master
Commit: 78cf06abf4c44851c116f71e27326773356c14b7
Parents: 986df60
Author: Matthieu Baechler 
Authored: Thu Jun 22 16:59:45 2017 +0200
Committer: Matthieu Baechler 
Committed: Thu Jul 6 10:32:17 2017 -0400

--
 .../GenericSimpleScriptedTestProtocol.java  | 206 +
 .../mpt/script/ImapScriptedTestProtocol.java|  30 ++
 .../mpt/script/SimpleScriptedTestProtocol.java  | 176 +---
 .../cassandra/CassandraAuthenticatePlain.java   |  32 ++
 .../cassandra/CassandraAuthenticatedState.java  |  32 ++
 .../cassandra/CassandraConcurrentSessions.java  |  32 ++
 .../cassandra/CassandraCondstore.java   |  34 ++
 .../imapmailbox/cassandra/CassandraCopy.java|  32 ++
 .../imapmailbox/cassandra/CassandraEvents.java  |  32 ++
 .../imapmailbox/cassandra/CassandraExpunge.java |  32 ++
 .../imapmailbox/cassandra/CassandraFetch.java   |  32 ++
 .../cassandra/CassandraFetchBodySection.java|  32 ++
 .../cassandra/CassandraFetchBodyStructure.java  |  32 ++
 .../cassandra/CassandraFetchHeaders.java|  32 ++
 .../imapmailbox/cassandra/CassandraListing.java |  32 ++
 .../cassandra/CassandraMailboxAnnotation.java   |  32 ++
 .../cassandra/CassandraMailboxTest.java |  79 
 .../CassandraMailboxWithLongNameError.java  |  32 ++
 .../CassandraMailboxWithLongNameSuccess.java|  34 ++
 .../imapmailbox/cassandra/CassandraMove.java|  32 ++
 .../CassandraNonAuthenticatedState.java |  32 ++
 .../cassandra/CassandraPartialFetch.java|  32 ++
 .../cassandra/CassandraQuotaTest.java   |  32 ++
 .../imapmailbox/cassandra/CassandraRename.java  |  32 ++
 .../imapmailbox/cassandra/CassandraSearch.java  |  32 ++
 .../cassandra/CassandraSecurity.java|  32 ++
 .../imapmailbox/cassandra/CassandraSelect.java  |  32 ++
 .../cassandra/CassandraSelectedInbox.java   |  32 ++
 .../cassandra/CassandraSelectedState.java   |  32 ++
 .../cassandra/CassandraUidSearch.java   |  32 ++
 .../cassandra/CassandraUidSearchOnIndex.java|  32 ++
 .../cassandra/CassandraUserFlagsSupport.java|  32 ++
 .../cassandra/host/CassandraHostSystem.java |  16 +-
 mpt/impl/imap-mailbox/core/pom.xml  |   4 -
 .../mpt/imapmailbox/AbstractMailboxTest.java|  76 
 .../mpt/imapmailbox/suite/ACLCommands.java  |  60 +--
 .../mpt/imapmailbox/suite/ACLIntegration.java   | 218 +
 .../suite/ACLScriptedTestProtocol.java  |  82 
 .../imapmailbox/suite/AuthenticatePlain.java|  40 +-
 .../imapmailbox/suite/AuthenticatedState.java   |  16 +-
 .../imapmailbox/suite/ConcurrentSessions.java   |  17 +-
 .../james/mpt/imapmailbox/suite/Condstore.java  |  11 +-
 .../james/mpt/imapmailbox/suite/Copy.java   |  12 +-
 .../imapmailbox/suite/DeploymentValidation.java |  17 +-
 .../james/mpt/imapmailbox/suite/Events.java |  17 +-
 .../james/mpt/imapmailbox/suite/Expunge.java|  18 +-
 .../james/mpt/imapmailbox/suite/Fetch.java  |  18 +-
 .../mpt/imapmailbox/suite/FetchBodySection.java |  17 +-
 .../imapmailbox/suite/FetchBodyStructure.java   |  18 +-
 .../mpt/imapmailbox/suite/FetchHeaders.java |  18 +-
 .../james/mpt/imapmailbox/suite/Listing.java|  17 +-
 .../imapmailbox/suite/MailboxAnnotation.java|  15 +-
 .../suite/MailboxWithLongNameError.java |  18 +-
 .../suite/MailboxWithLongNameSuccess.java   |  13 +-
 .../james/mpt/imapmailbox/suite/Move.java   |  16 +-
 .../suite/NonAuthenticatedState.java|  17 +-
 .../mpt/imapmailbox/suite/PartialFetch.java |  18 +-
 .../james/mpt/imapmailbox/suite/QuotaTest.java  |  10 +-
 .../james/mpt/imapmailbox/suite/Rename.java |  18 +-
 .../james/mpt/imapmailbox/suite/Search.java |  17 +-
 .../james/mpt/imapmailbox/suite/Security.java   |  20 +-
 .../james/mpt/imapmailbox/suite/Select.java |  17 +-
 .../mpt/imapmailbox/suite/SelectedInbox.java|  17 +-
 .../mpt/imapmailbox/suite/SelectedState.java|  18 +-
 .../james/mpt/imapmailbox/suite/UidSearch.java  |  17 +-
 .../mpt/imapmailbox/suite/UidSearchOnIndex.java |  13 +-
 .../mpt/imapmailbox/suite/UserFlagsSupport.java |  15 +-
 .../suite/base/BasicImapCommands.java   |   5 +-
 .../mpt/imapmailbox/cyrus/CyrusACLCommands.java |  41 ++
 .../imapmailbox/cyrus/CyrusACLIntegration.java  |  49 ++
 .../mpt/imapmailbox/cyrus/CyrusMailboxTest.java |  54 ---
 .../elasticsearch/ElasticSearchMailboxTest.java |  34 --
 .../ElasticSearchUidSearchOnIndex.java  |  33 ++
 

[17/21] james-project git commit: MPT-39 Add missing licenses in MPT

2017-07-07 Thread aduprat
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetch.java
--
diff --git 
a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetch.java
 
b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetch.java
index 1371555..2e8f2af 100644
--- 
a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetch.java
+++ 
b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetch.java
@@ -1,3 +1,22 @@
+/
+ * 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.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;

http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodySection.java
--
diff --git 
a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodySection.java
 
b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodySection.java
index 9586144..bc792ec 100644
--- 
a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodySection.java
+++ 
b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodySection.java
@@ -1,3 +1,22 @@
+/
+ * 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.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;

http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodyStructure.java
--
diff --git 
a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodyStructure.java
 
b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodyStructure.java
index 34967ab..ac1c0bb 100644
--- 
a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodyStructure.java
+++ 

[12/21] james-project git commit: MPT-39 remove crazy abstract test class hierarchy

2017-07-07 Thread aduprat
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java
--
diff --git 
a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java
 
b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java
index f083caa..988fe8e 100644
--- 
a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java
+++ 
b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java
@@ -24,135 +24,201 @@ import java.util.Locale;
 import javax.inject.Inject;
 
 import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
 import org.junit.Test;
 
-public class Fetch extends BaseSelectedState {
+public class Fetch implements ImapTestConstants {
 
 @Inject
 private static HostSystem system;
 
-public Fetch() throws Exception {
-super(system);
+
+private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+@Before
+public void setUp() throws Exception {
+simpleScriptedTestProtocol = new 
SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+.withUser(USER, PASSWORD)
+.withLocale(Locale.US);
+BasicImapCommands.welcome(simpleScriptedTestProtocol);
+BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
+}
+
+@After
+public void tearDown() throws Exception {
+system.afterTest();
 }
 
 @Test
 public void testFetchEnvelopeUS() throws Exception {
-scriptTest("FetchEnvelope", Locale.US);
+simpleScriptedTestProtocol
+.withLocale(Locale.US)
+.run("FetchEnvelope");
 }
 
 @Test
 public void testFetchEnvelopeIT() throws Exception {
-scriptTest("FetchEnvelope", Locale.ITALY);
+simpleScriptedTestProtocol
+.withLocale(Locale.ITALY)
+.run("FetchEnvelope");
 }
 
 @Test
 public void testFetchEnvelopeKOREA() throws Exception {
-scriptTest("FetchEnvelope", Locale.KOREA);
+simpleScriptedTestProtocol
+.withLocale(Locale.KOREA)
+.run("FetchEnvelope");
 }
 
 @Test
 public void testFetchTextUS() throws Exception {
-scriptTest("FetchText", Locale.US);
+simpleScriptedTestProtocol
+.withLocale(Locale.US)
+.run("FetchText");
 }
 
 @Test
 public void testFetchBodyNoSectionUS() throws Exception {
-scriptTest("FetchBodyNoSection", Locale.US);
+simpleScriptedTestProtocol
+.withLocale(Locale.US)
+.run("FetchBodyNoSection");
 }
 
 @Test
 public void testFetchTextIT() throws Exception {
-scriptTest("FetchText", Locale.ITALY);
+simpleScriptedTestProtocol
+.withLocale(Locale.ITALY)
+.run("FetchText");
 }
 
 @Test
 public void testFetchBodyNoSectionIT() throws Exception {
-scriptTest("FetchBodyNoSection", Locale.ITALY);
+simpleScriptedTestProtocol
+.withLocale(Locale.ITALY)
+.run("FetchBodyNoSection");
 }
 
 @Test
 public void testFetchTextKOREA() throws Exception {
-scriptTest("FetchText", Locale.KOREA);
+simpleScriptedTestProtocol
+.withLocale(Locale.KOREA)
+.run("FetchText");
 }
 
 @Test
 public void testFetchBodyNoSectionKOREA() throws Exception {
-scriptTest("FetchBodyNoSection", Locale.KOREA);
+simpleScriptedTestProtocol
+.withLocale(Locale.KOREA)
+.run("FetchBodyNoSection");
 }
 
 @Test
 public void testFetchRFC822US() throws Exception {
-scriptTest("FetchRFC822", Locale.US);
+simpleScriptedTestProtocol
+.withLocale(Locale.US)
+.run("FetchRFC822");
 }
 
 @Test
 public void testFetchRFC822TextUS() throws Exception {
-scriptTest("FetchRFC822Text", Locale.US);
+simpleScriptedTestProtocol
+.withLocale(Locale.US)
+.run("FetchRFC822Text");
 }
 
 @Test
 public void testFetchRFC822HeaderUS() throws Exception {
-scriptTest("FetchRFC822Header", Locale.US);
+simpleScriptedTestProtocol
+.withLocale(Locale.US)
+.run("FetchRFC822Header");
 }
 
 @Test
 public void testFetchRFC822KOREA() throws Exception {
-scriptTest("FetchRFC822", Locale.KOREA);
+ 

Re: Release james-server into 3.0.0

2017-07-07 Thread Tellier Benoit
Hi,

One week ago we called for the vote of the Apache James 3.0.0 release.

After a one week voting process, we have decided to re-upload the
pre-compiled jars with:
- A more understandable README
- An already working configuration

Thus we will trigger a new voting process including the freshly released
artifacts.

Best regards,
Benoit Tellier
Apache James PMC

Le 30/06/2017 à 14:22, aduprat a écrit :
> 
> You can access sources on github
> 
> https://github.com/apache/james-project/releases
> 
> Nexus artifact to be released can be found here :
> https://repository.apache.org/#stagingRepositories
> 
> It is number #1017
> 
> Moreover I uploaded compiled zip, along with md5 and sha1 sums, all signed.
> 
> http://www.apache.org/dist/james/server/3.0.0/james-server-app-3.0.0-app.zip
> 
> http://www.apache.org/dist/james/server/3.0.0/james-server-app-3.0.0-app.zip.sig
> 
> http://www.apache.org/dist/james/server/3.0.0/james-server-app-3.0.0-app.zip.md5
> 
> http://www.apache.org/dist/james/server/3.0.0/james-server-app-3.0.0-app.zip.md5.sig
> 
> http://www.apache.org/dist/james/server/3.0.0/james-server-app-3.0.0-app.zip.sha1
> 
> http://www.apache.org/dist/james/server/3.0.0/james-server-app-3.0.0-app.zip.sha1.sig

-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[14/21] james-project git commit: MPT-39 Re-enable CONDSTORE related tests

2017-07-07 Thread aduprat
MPT-39 Re-enable CONDSTORE related tests


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

Branch: refs/heads/master
Commit: 6a23a1b2519b2e8abfdf00e5d711933888a680f4
Parents: 78cf06a
Author: benwa 
Authored: Fri Jun 23 10:21:00 2017 +0700
Committer: Matthieu Baechler 
Committed: Thu Jul 6 10:32:17 2017 -0400

--
 .../james/mpt/imapmailbox/cassandra/CassandraCondstore.java| 2 --
 .../mpt/imapmailbox/cassandra/CassandraMailboxTestModule.java  | 6 --
 .../java/org/apache/james/mpt/imapmailbox/suite/Condstore.java | 2 +-
 .../org/apache/james/imap/scripts/CondstoreDisable.test| 3 ++-
 .../org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java | 2 --
 .../james/mpt/imapmailbox/hbase/HBaseMailboxTestModule.java| 6 --
 .../james/mpt/imapmailbox/inmemory/InMemoryCondstore.java  | 2 --
 .../org/apache/james/mpt/imapmailbox/jpa/JpaCondstore.java | 2 --
 .../apache/james/mpt/imapmailbox/jpa/JpaMailboxTestModule.java | 4 +++-
 .../james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java| 2 --
 .../lucenesearch/LuceneSearchMailboxTestModule.java| 6 --
 .../apache/james/mpt/imapmailbox/maildir/MaildirCondstore.java | 2 --
 .../mpt/imapmailbox/maildir/MaildirMailboxTestModule.java  | 6 --
 13 files changed, 22 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/6a23a1b2/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCondstore.java
--
diff --git 
a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCondstore.java
 
b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCondstore.java
index 6e59ec6..5fb4727 100644
--- 
a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCondstore.java
+++ 
b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCondstore.java
@@ -4,12 +4,10 @@ import org.apache.james.mpt.host.JamesImapHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.Condstore;
 import org.junit.After;
 import org.junit.Before;
-import org.junit.Ignore;
 
 import com.google.inject.Guice;
 import com.google.inject.Injector;
 
-@Ignore("why it was no enabled on cassandra ?")
 public class CassandraCondstore extends Condstore {
 
 private JamesImapHostSystem system;

http://git-wip-us.apache.org/repos/asf/james-project/blob/6a23a1b2/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTestModule.java
--
diff --git 
a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTestModule.java
 
b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTestModule.java
index 516de6d..1133302 100644
--- 
a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTestModule.java
+++ 
b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTestModule.java
@@ -21,6 +21,7 @@ package org.apache.james.mpt.imapmailbox.cassandra;
 
 import org.apache.james.mpt.api.HostSystem;
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.host.JamesImapHostSystem;
 import org.apache.james.mpt.imapmailbox.cassandra.host.CassandraHostSystem;
 
 import com.google.inject.AbstractModule;
@@ -31,12 +32,13 @@ public class CassandraMailboxTestModule extends 
AbstractModule {
 
 @Override
 protected void configure() {
-bind(HostSystem.class).to(ImapHostSystem.class);
+bind(HostSystem.class).to(JamesImapHostSystem.class);
+bind(ImapHostSystem.class).to(JamesImapHostSystem.class);
 }
 
 @Provides
 @Singleton
-public ImapHostSystem provideHostSystem() throws Exception {
+public JamesImapHostSystem provideHostSystem() throws Exception {
 return new CassandraHostSystem();
 }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/6a23a1b2/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java
--
diff --git 
a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java
 

[01/21] james-project git commit: MPT-39 Handle issue tracking for too long mailboxes names

2017-07-07 Thread aduprat
Repository: james-project
Updated Branches:
  refs/heads/master f2cca215c -> 3a70ae82d


MPT-39 Handle issue tracking for too long mailboxes names


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

Branch: refs/heads/master
Commit: ae3367632aac3c4a91fe23105b5e3dcea80e4787
Parents: 6a23a1b
Author: benwa 
Authored: Fri Jun 23 10:33:48 2017 +0700
Committer: Matthieu Baechler 
Committed: Thu Jul 6 10:32:17 2017 -0400

--
 .../CassandraMailboxWithLongNameSuccess.java| 34 ---
 .../suite/MailboxWithLongNameSuccess.java   |  3 --
 .../hbase/HBaseMailboxWithLongNameSuccess.java  | 34 ---
 .../InMemoryMailboxWithLongNameError.java   | 34 ---
 .../jpa/JpaMailboxWithLongNameError.java|  2 +-
 .../jpa/JpaMailboxWithLongNameSuccess.java  | 34 ---
 .../LuceneMailboxWithLongNameError.java |  2 +-
 .../LuceneMailboxWithLongNameSuccess.java   | 35 
 .../MaildirMailboxWithLongNameError.java|  2 +-
 .../MaildirMailboxWithLongNameSuccess.java  | 34 ---
 10 files changed, 3 insertions(+), 211 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/ae336763/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameSuccess.java
--
diff --git 
a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameSuccess.java
 
b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameSuccess.java
deleted file mode 100644
index 1be29c0..000
--- 
a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameSuccess.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.apache.james.mpt.imapmailbox.cassandra;
-
-import org.apache.james.mpt.api.ImapHostSystem;
-import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameSuccess;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-@Ignore("do we have a JIRA for that ?")
-public class CassandraMailboxWithLongNameSuccess extends 
MailboxWithLongNameSuccess {
-
-private ImapHostSystem system;
-
-@Before
-public void setUp() throws Exception {
-Injector injector = Guice.createInjector(new 
CassandraMailboxTestModule());
-system = injector.getInstance(ImapHostSystem.class);
-super.setUp();
-}
-
-@Override
-protected ImapHostSystem createImapHostSystem() {
-return system;
-}
-
-@After
-public void tearDown() throws Exception {
-system.afterTest();
-}
-
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/ae336763/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
index 92c4e53..8366ea1 100644
--- 
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
@@ -26,10 +26,8 @@ import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 
-@Ignore("why ?")
 public abstract class MailboxWithLongNameSuccess implements ImapTestConstants {
 
 protected abstract ImapHostSystem createImapHostSystem();
@@ -45,7 +43,6 @@ public abstract class MailboxWithLongNameSuccess implements 
ImapTestConstants {
 .withLocale(Locale.US);
 BasicImapCommands.welcome(simpleScriptedTestProtocol);
 BasicImapCommands.authenticate(simpleScriptedTestProtocol);
-BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
 }
 
 @Test


[08/21] james-project git commit: MPT-39 finally remove this crazy static injection with onami

2017-07-07 Thread aduprat
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/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 5cdc63a..d695788 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
@@ -21,25 +21,23 @@ 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.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-public class SelectedInbox implements ImapTestConstants {
+public abstract class SelectedInbox implements ImapTestConstants {
 
-@Inject
-private static HostSystem system;
+protected abstract ImapHostSystem createImapHostSystem();
 
+private ImapHostSystem system;
 private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
 @Before
 public void setUp() throws Exception {
+system = createImapHostSystem();
 simpleScriptedTestProtocol = new 
SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
 .withUser(USER, PASSWORD)
 .withLocale(Locale.US);
@@ -48,11 +46,6 @@ public class SelectedInbox implements ImapTestConstants {
 BasicImapCommands.selectInbox(simpleScriptedTestProtocol);
 }
 
-@After
-public void tearDown() throws Exception {
-system.afterTest();
-}
-
 @Test
 public void testValidNonAuthenticatedUS() throws Exception {
 simpleScriptedTestProtocol

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.java
--
diff --git 
a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.java
 
b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.java
index bc30f44..64a1fcf 100644
--- 
a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.java
+++ 
b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.java
@@ -21,26 +21,23 @@ 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.api.ImapHostSystem;
 import org.apache.james.mpt.imapmailbox.ImapTestConstants;
 import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-public class SelectedState implements ImapTestConstants {
+public abstract class SelectedState implements ImapTestConstants {
 
-@Inject
-private static HostSystem system;
-
+protected abstract ImapHostSystem createImapHostSystem();
 
+private ImapHostSystem system;
 private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
 
 @Before
 public void setUp() throws Exception {
+system = createImapHostSystem();
 simpleScriptedTestProtocol = new 
SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
 .withUser(USER, PASSWORD)
 .withLocale(Locale.US);
@@ -49,11 +46,6 @@ public class SelectedState implements ImapTestConstants {
 BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
 }
 
-@After
-public void tearDown() throws Exception {
-system.afterTest();
-}
-
 @Test
 public void testCheckUS() throws Exception {
 simpleScriptedTestProtocol

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java
--
diff --git 
a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java
 
b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java
index 5e1d5e1..e408248 100644
--- 
a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java
+++ 

[06/21] james-project git commit: MPT-39 finally remove this crazy static injection with onami

2017-07-07 Thread aduprat
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneConcurrentSessions.java
--
diff --git 
a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneConcurrentSessions.java
 
b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneConcurrentSessions.java
new file mode 100644
index 000..9ac3301
--- /dev/null
+++ 
b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneConcurrentSessions.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.ConcurrentSessions;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneConcurrentSessions extends ConcurrentSessions {
+
+private ImapHostSystem system;
+
+@Before
+public void setUp() throws Exception {
+Injector injector = Guice.createInjector(new 
LuceneSearchMailboxTestModule());
+system = injector.getInstance(ImapHostSystem.class);
+system.beforeTest();
+super.setUp();
+}
+
+@Override
+protected ImapHostSystem createImapHostSystem() {
+return system;
+}
+
+@After
+public void tearDown() throws Exception {
+system.afterTest();
+}
+
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java
--
diff --git 
a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java
 
b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java
new file mode 100644
index 000..ad90cf4
--- /dev/null
+++ 
b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java
@@ -0,0 +1,35 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.host.JamesImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Condstore;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+@Ignore("why ?")
+public class LuceneCondstore extends Condstore {
+
+private JamesImapHostSystem system;
+
+@Before
+public void setUp() throws Exception {
+Injector injector = Guice.createInjector(new 
LuceneSearchMailboxTestModule());
+system = injector.getInstance(JamesImapHostSystem.class);
+system.beforeTest();
+super.setUp();
+}
+
+@Override
+protected JamesImapHostSystem createJamesImapHostSystem() {
+return system;
+}
+
+@After
+public void tearDown() throws Exception {
+system.afterTest();
+}
+
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCopy.java
--
diff --git 
a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCopy.java
 
b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCopy.java
new file mode 100644
index 000..8f10a2e
--- /dev/null
+++ 
b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCopy.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Copy;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneCopy extends Copy {
+
+private ImapHostSystem system;
+
+@Before
+public void setUp() throws Exception {
+Injector injector = Guice.createInjector(new 
LuceneSearchMailboxTestModule());
+system = injector.getInstance(ImapHostSystem.class);
+system.beforeTest();
+super.setUp();
+}
+
+@Override
+protected ImapHostSystem createImapHostSystem() {
+return system;
+}
+
+@After
+public void tearDown() throws Exception {
+system.afterTest();
+}
+
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneEvents.java

[11/21] james-project git commit: MPT-39 remove crazy abstract test class hierarchy

2017-07-07 Thread aduprat
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java
--
diff --git 
a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java
 
b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java
index 99481ed..5e1d5e1 100644
--- 
a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java
+++ 
b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java
@@ -24,46 +24,74 @@ import java.util.Locale;
 import javax.inject.Inject;
 
 import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseAuthenticatedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
 import org.junit.Test;
 
-public class UidSearch extends BaseAuthenticatedState {
+public class UidSearch implements ImapTestConstants {
 
 @Inject
 private static HostSystem system;
 
-public UidSearch() throws Exception {
-super(system);
+private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+@Before
+public void setUp() throws Exception {
+simpleScriptedTestProtocol = new 
SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+.withUser(USER, PASSWORD)
+.withLocale(Locale.US);
+BasicImapCommands.welcome(simpleScriptedTestProtocol);
+BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+}
+
+@After
+public void tearDown() throws Exception {
+system.afterTest();
 }
 
 @Test
 public void testSearchAtomsUS() throws Exception {
-scriptTest("UidSearchAtoms", Locale.US);
+simpleScriptedTestProtocol
+.withLocale(Locale.US)
+.run("UidSearchAtoms");
 }
 
 @Test
 public void testSearchAtomsITALY() throws Exception {
-scriptTest("UidSearchAtoms", Locale.ITALY);
+simpleScriptedTestProtocol
+.withLocale(Locale.ITALY)
+.run("UidSearchAtoms");
 }
 
 @Test
 public void testSearchAtomsKOREA() throws Exception {
-scriptTest("UidSearchAtoms", Locale.KOREA);
+simpleScriptedTestProtocol
+.withLocale(Locale.KOREA)
+.run("UidSearchAtoms");
 }
 
 @Test
 public void testSearchCombinationsUS() throws Exception {
-scriptTest("UidSearchCombinations", Locale.US);
+simpleScriptedTestProtocol
+.withLocale(Locale.US)
+.run("UidSearchCombinations");
 }
 
 @Test
 public void testSearchCombinationsITALY() throws Exception {
-scriptTest("UidSearchCombinations", Locale.ITALY);
+simpleScriptedTestProtocol
+.withLocale(Locale.ITALY)
+.run("UidSearchCombinations");
 }
 
 @Test
 public void testSearchCombinationsKOREA() throws Exception {
-scriptTest("UidSearchCombinations", Locale.KOREA);
+simpleScriptedTestProtocol
+.withLocale(Locale.KOREA)
+.run("UidSearchCombinations");
 }
 }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearchOnIndex.java
--
diff --git 
a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearchOnIndex.java
 
b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearchOnIndex.java
index 25c1026..1029027 100644
--- 
a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearchOnIndex.java
+++ 
b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearchOnIndex.java
@@ -19,25 +19,38 @@
 
 package org.apache.james.mpt.imapmailbox.suite;
 
-import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseAuthenticatedState;
-import org.junit.Test;
+import java.util.Locale;
 
 import javax.inject.Inject;
-import java.util.Locale;
 
-public class UidSearchOnIndex extends BaseAuthenticatedState {
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.Before;
+import org.junit.Test;
+
+public class UidSearchOnIndex implements ImapTestConstants {
 
 @Inject
 private static HostSystem system;
 
-public UidSearchOnIndex() throws Exception 

[16/21] james-project git commit: MPT-39 Add missing licenses in MPT

2017-07-07 Thread aduprat
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedInbox.java
--
diff --git 
a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedInbox.java
 
b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedInbox.java
index 051379a..4c0d518 100644
--- 
a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedInbox.java
+++ 
b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedInbox.java
@@ -1,3 +1,22 @@
+/
+ * 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.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;

http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedState.java
--
diff --git 
a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedState.java
 
b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedState.java
index 1a0c9b9..87aea1b 100644
--- 
a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedState.java
+++ 
b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedState.java
@@ -1,3 +1,22 @@
+/
+ * 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.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;

http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearch.java
--
diff --git 
a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearch.java
 
b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearch.java
index 19e9ed5..0c82593 100644
--- 
a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearch.java
+++ 
b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearch.java
@@ -1,3 +1,22 @@
+/
+ * 

[13/21] james-project git commit: MPT-39 remove crazy abstract test class hierarchy

2017-07-07 Thread aduprat
MPT-39 remove crazy abstract test class hierarchy


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

Branch: refs/heads/master
Commit: 986df60d3ebdbba3239a00810d427267c80d5921
Parents: 46cd28e
Author: Matthieu Baechler 
Authored: Wed Jun 21 16:52:13 2017 +0200
Committer: Matthieu Baechler 
Committed: Thu Jul 6 10:32:17 2017 -0400

--
 .../script/AbstractProtocolTestFramework.java   | 115 -
 .../AbstractSimpleScriptedTestProtocol.java | 111 -
 .../mpt/script/SimpleScriptedTestProtocol.java  | 181 ++
 .../mpt/imapmailbox/suite/ACLCommands.java  |  51 ++--
 .../mpt/imapmailbox/suite/ACLIntegration.java   |  89 +++
 .../imapmailbox/suite/AuthenticatePlain.java|  33 ++-
 .../imapmailbox/suite/AuthenticatedState.java   | 234 +--
 .../imapmailbox/suite/ConcurrentSessions.java   | 115 ++---
 .../james/mpt/imapmailbox/suite/Condstore.java  |  25 +-
 .../james/mpt/imapmailbox/suite/Copy.java   |  22 +-
 .../imapmailbox/suite/DeploymentValidation.java |  29 ++-
 .../james/mpt/imapmailbox/suite/Events.java |  37 ++-
 .../james/mpt/imapmailbox/suite/Expunge.java|  38 ++-
 .../james/mpt/imapmailbox/suite/Fetch.java  | 122 +++---
 .../mpt/imapmailbox/suite/FetchBodySection.java |  61 +++--
 .../imapmailbox/suite/FetchBodyStructure.java   |  74 --
 .../mpt/imapmailbox/suite/FetchHeaders.java |  50 +++-
 .../james/mpt/imapmailbox/suite/Listing.java|  47 +++-
 .../imapmailbox/suite/MailboxAnnotation.java|  39 +++-
 .../suite/MailboxWithLongNameError.java |  31 ++-
 .../suite/MailboxWithLongNameSuccess.java   |  26 ++-
 .../james/mpt/imapmailbox/suite/Move.java   |  30 ++-
 .../suite/NonAuthenticatedState.java| 107 +++--
 .../mpt/imapmailbox/suite/PartialFetch.java |  74 --
 .../james/mpt/imapmailbox/suite/QuotaTest.java  |  41 +++-
 .../james/mpt/imapmailbox/suite/Rename.java |  62 +++--
 .../james/mpt/imapmailbox/suite/Search.java |  48 +++-
 .../james/mpt/imapmailbox/suite/Security.java   | 112 ++---
 .../james/mpt/imapmailbox/suite/Select.java |  36 ++-
 .../mpt/imapmailbox/suite/SelectedInbox.java| 193 +++
 .../mpt/imapmailbox/suite/SelectedState.java| 146 +---
 .../james/mpt/imapmailbox/suite/UidSearch.java  |  48 +++-
 .../mpt/imapmailbox/suite/UidSearchOnIndex.java |  31 ++-
 .../mpt/imapmailbox/suite/UserFlagsSupport.java |  31 ++-
 .../suite/base/BaseAuthenticatedState.java  |  85 ---
 .../suite/base/BaseImapProtocol.java|  39 
 .../suite/base/BaseNonAuthenticatedState.java   |  59 -
 .../suite/base/BaseSelectedInbox.java   |  75 --
 .../suite/base/BaseSelectedState.java   |  64 -
 .../suite/base/BasicImapCommands.java   |  68 ++
 .../james/mpt/testsuite/AuthenticateTest.java   |  29 ++-
 .../james/mpt/testsuite/CapabilityTest.java |  29 ++-
 .../james/mpt/testsuite/CheckScriptTest.java|  24 +-
 .../james/mpt/testsuite/DeleteScriptTest.java   |  31 ++-
 .../james/mpt/testsuite/GetScriptTest.java  |  29 ++-
 .../james/mpt/testsuite/HaveSpaceTest.java  |  29 ++-
 .../james/mpt/testsuite/ListScriptsTest.java|  29 ++-
 .../apache/james/mpt/testsuite/LogoutTest.java  |  31 ++-
 .../james/mpt/testsuite/ManageSieveMPTTest.java |  33 ---
 .../apache/james/mpt/testsuite/NoopTest.java|  33 ++-
 .../james/mpt/testsuite/PutScriptTest.java  |  29 ++-
 .../james/mpt/testsuite/RenameScriptTest.java   |  29 ++-
 .../james/mpt/testsuite/SetActiveTest.java  |  29 ++-
 .../james/mpt/testsuite/StartTlsTest.java   |  29 ++-
 .../mpt/testsuite/UnauthenticatedTest.java  |  29 ++-
 .../apache/james/mpt/smtp/ForwardSmtpTest.java  |  13 +-
 .../james/mpt/smtp/SmtpStarttlsCommandTest.java |  30 ++-
 57 files changed, 2138 insertions(+), 1226 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/core/src/main/java/org/apache/james/mpt/script/AbstractProtocolTestFramework.java
--
diff --git 
a/mpt/core/src/main/java/org/apache/james/mpt/script/AbstractProtocolTestFramework.java
 
b/mpt/core/src/main/java/org/apache/james/mpt/script/AbstractProtocolTestFramework.java
deleted file mode 100644
index 3d2ac5d..000
--- 
a/mpt/core/src/main/java/org/apache/james/mpt/script/AbstractProtocolTestFramework.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/
- * Licensed to the Apache Software Foundation 

[02/21] james-project git commit: MPT-39 finally remove this crazy static injection with onami

2017-07-07 Thread aduprat
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectMockObjectTestCase.java
--
diff --git 
a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectMockObjectTestCase.java
 
b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectMockObjectTestCase.java
deleted file mode 100644
index 46956a6..000
--- 
a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectMockObjectTestCase.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/
- * 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.onami.test;
-
-import javax.inject.Inject;
-
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-import org.apache.james.mpt.onami.test.annotation.Mock;
-import org.apache.james.mpt.onami.test.data.HelloWorld;
-import org.apache.james.mpt.onami.test.data.SimpleModule;
-import org.apache.james.mpt.onami.test.data.TelephonService;
-import org.easymock.EasyMock;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import com.google.inject.Injector;
-
-@RunWith(OnamiRunner.class)
-@GuiceModules(SimpleModule.class)
-public class InjectMockObjectTestCase extends AbstractMockTestCase {
-
-// Create and inject a simple EasyMock Strict mock
-@Mock
-private TelephonService telephonServiceMock;
-
-@Inject
-Injector injector;
-
-@Inject
-private HelloWorld helloWorld;
-
-@Test
-public void testMock() {
-EasyMock.expect(providedMock.go()).andReturn("Ciao");
-EasyMock.replay(providedMock);
-
-Assert.assertNotNull(this.providedMock);
-Assert.assertEquals("Ciao", helloWorld.sayHalloByService());
-EasyMock.verify(providedMock);
-}
-
-@Test
-public void testMock2() {
-EasyMock.expect(providedMock.go()).andReturn("Ciao");
-EasyMock.replay(providedMock);
-
-Assert.assertNotNull(this.providedMock);
-Assert.assertEquals("Ciao", helloWorld.sayHalloByService());
-EasyMock.verify(providedMock);
-}
-
-@Test
-public void testStrickMock() {
-
EasyMock.expect(telephonServiceMock.getTelephonNumber()).andReturn("1234567890");
-providedMock.call("1234567890");
-EasyMock.expectLastCall().once();
-EasyMock.replay(telephonServiceMock);
-EasyMock.replay(providedMock);
-
-helloWorld.callHelloWorldTelephon();
-
-EasyMock.verify(telephonServiceMock);
-EasyMock.verify(providedMock);
-
-// reset manually the mock object. Flag resettable is false!!!
-EasyMock.reset(telephonServiceMock);
-}
-
-@Test
-public void testStrickMock2() {
-Assert.assertNotNull(telephonServiceMock);
-}
-
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectModuleClassTestCase.java
--
diff --git 
a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectModuleClassTestCase.java
 
b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectModuleClassTestCase.java
deleted file mode 100644
index 9fc92bb..000
--- 
a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectModuleClassTestCase.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/
- * 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, 

Release james-server into 3.0.0 (second vote)

2017-07-07 Thread Tellier Benoit
Hello every one,

I'm very very very happy to announce the second vote for the upcoming
3.0.0 version of our beloved James server.

You can access sources on GitHub:

https://github.com/apache/james-project/releases

Nexus artifact to be released can be found here :
https://repository.apache.org/#stagingRepositories

It is number #1017

Moreover I uploaded compiled zip, along with md5 and sha1 sums, all signed.

http://www.apache.org/dist/james/server/3.0.0/james-server-app-3.0.0-app.zip
http://www.apache.org/dist/james/server/3.0.0/james-server-app-3.0.0-app.zip.sig
http://www.apache.org/dist/james/server/3.0.0/james-server-app-3.0.0-app.zip.md5
http://www.apache.org/dist/james/server/3.0.0/james-server-app-3.0.0-app.zip.md5.sig
http://www.apache.org/dist/james/server/3.0.0/james-server-app-3.0.0-app.zip.sha1
http://www.apache.org/dist/james/server/3.0.0/james-server-app-3.0.0-app.zip.sha1.sig

These artifact include corrections on the READMEs and are shipped with a
default configuration, that works out of the box.

According to Release policy, we need a majority vote :
 - At least 3 PMC
 - A majority of voters
 - This release can't be vetoed

Followhttp://www.apache.org/dev/release.html  for more details.

To vote, you can reply to this email with

+1

If you accept the release

-1

If you reject the release

Votes will close on Friday 14th July 2017, 6pm CEST.

Regards,

Antoine Duprat

-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



Re: Release james-server into 3.0.0 (second vote)

2017-07-07 Thread Tellier Benoit
+1

Le 07/07/2017 à 18:25, Tellier Benoit a écrit :
> Hello every one,
> 
> I'm very very very happy to announce the second vote for the upcoming
> 3.0.0 version of our beloved James server.
> 
> You can access sources on GitHub:
> 
> https://github.com/apache/james-project/releases
> 
> Nexus artifact to be released can be found here :
> https://repository.apache.org/#stagingRepositories
> 
> It is number #1017
> 
> Moreover I uploaded compiled zip, along with md5 and sha1 sums, all signed.
> 
> http://www.apache.org/dist/james/server/3.0.0/james-server-app-3.0.0-app.zip
> http://www.apache.org/dist/james/server/3.0.0/james-server-app-3.0.0-app.zip.sig
> http://www.apache.org/dist/james/server/3.0.0/james-server-app-3.0.0-app.zip.md5
> http://www.apache.org/dist/james/server/3.0.0/james-server-app-3.0.0-app.zip.md5.sig
> http://www.apache.org/dist/james/server/3.0.0/james-server-app-3.0.0-app.zip.sha1
> http://www.apache.org/dist/james/server/3.0.0/james-server-app-3.0.0-app.zip.sha1.sig
> 
> These artifact include corrections on the READMEs and are shipped with a
> default configuration, that works out of the box.
> 
> According to Release policy, we need a majority vote :
>  - At least 3 PMC
>  - A majority of voters
>  - This release can't be vetoed
> 
> Followhttp://www.apache.org/dev/release.html  for more details.
> 
> To vote, you can reply to this email with
> 
> +1
> 
> If you accept the release
> 
> -1
> 
> If you reject the release
> 
> Votes will close on Friday 14th July 2017, 6pm CEST.
> 
> Regards,
> 
> Antoine Duprat
> 
> -
> To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
> For additional commands, e-mail: server-dev-h...@james.apache.org
> 

-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



james-project git commit: Updated grammar at top of readme.

2017-07-07 Thread aduprat
Repository: james-project
Updated Branches:
  refs/heads/master 46cd28e1c -> 1e19c150b


Updated grammar at top of readme.

n/t

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

Branch: refs/heads/master
Commit: 1e19c150ba2538f8d816d470eeea60c53d4c7e1c
Parents: 46cd28e
Author: Mike Gaffney 
Authored: Thu Jul 6 11:17:03 2017 -0700
Committer: GitHub 
Committed: Thu Jul 6 11:17:03 2017 -0700

--
 README.adoc | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/1e19c150/README.adoc
--
diff --git a/README.adoc b/README.adoc
index 133c26f..ed6de17 100644
--- a/README.adoc
+++ b/README.adoc
@@ -5,7 +5,7 @@ 
link:https://gitter.im/apache/james-project[image:https://badges.gitter.im/apach
 
 This is the parent module for all Apache James artifacts. It contains useful 
values to be inherited by other Maven projects.
 
-* the list of Apache James contributors, committers and PMC Members
+* The list of Apache James contributors, committers and PMC Members
 * Maven plugins management section with common plugins used in the project
 * URL's and mailing-lists definitions for the project
 
@@ -13,7 +13,7 @@ This is the parent module for all Apache James artifacts. It 
contains useful val
 
 Requirements: docker & docker-compose installed.
 
-When try James by this way, you will use the last state of James.
+When you try James this way, you will use the most current state of James.
 It will be configured to run with Cassandra & ElasticSearch.
 All those three components will be started with a single command.
 
@@ -25,15 +25,15 @@ Then, you just have to start the services:
 
 $ docker-compose up
 
-Wait a few seconds in order to have all those services up, you will see a such 
log when James is available:
+Wait a few seconds in order to have all those services start up. You will see 
the following log when James is available:
 james   | Started : true
 
-Then, a default domain has been created: james.local
+A default domain, james.local, has been created. You can see this by running:
 
 $ docker exec james java -jar /root/james-cli.jar -h 127.0.0.1 -p  
listdomains
 
 James will respond to IMAP port 143 and SMTP port 25.
-You have to create users before playing, you may also create other domains...
+You have to create users before playing with james. You may also want to 
create other domains.
 Follow the 'Useful commands' section for more information about James CLI.
 
 


-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org