Repository: james-project
Updated Branches:
  refs/heads/master 9ca2ca736 -> fabccf51c


JAMES-1908 make CassandraJmapTestRule composable


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

Branch: refs/heads/master
Commit: 3581696113c82011236f11151a9647f4fccbdccc
Parents: 9ca2ca7
Author: Luc DUZAN <[email protected]>
Authored: Thu Jan 19 14:49:51 2017 +0100
Committer: Benoit Tellier <[email protected]>
Committed: Mon Jan 23 13:17:04 2017 +0700

----------------------------------------------------------------------
 server/container/guice/cassandra-guice/pom.xml  |  5 ++
 .../james/AggregateGuiceModuleTestRule.java     | 82 ++++++++++++++++++++
 .../apache/james/CassandraJamesServerTest.java  |  2 +-
 .../org/apache/james/CassandraJmapTestRule.java | 45 +++++------
 .../CassandraMessageIdManagerInjectionTest.java |  2 +-
 .../org/apache/james/EmbeddedCassandraRule.java | 75 ++++++++++++++++++
 .../apache/james/EmbeddedElasticSearchRule.java | 55 +++++++++++++
 .../org/apache/james/GuiceModuleTestRule.java   | 29 +++++++
 .../apache/james/TempFilesystemTestRule.java    | 51 ++++++++++++
 .../java/org/apache/james/JmapJamesServer.java  |  7 +-
 .../CassandraGetMailboxesMethodTest.java        |  2 +-
 .../CassandraGetMessageListMethodTest.java      |  2 +-
 .../CassandraGetVacationResponseTest.java       |  2 +-
 .../CassandraJmapAuthenticationTest.java        |  2 +-
 .../CassandraSetMailboxesMethodTest.java        |  2 +-
 .../CassandraSetMessagesMethodTest.java         |  2 +-
 .../CassandraSetVacationResponseTest.java       |  2 +-
 .../CassandraVacationIntegrationTest.java       |  2 +-
 .../WebAdminServerIntegrationTest.java          |  2 +-
 19 files changed, 334 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/35816961/server/container/guice/cassandra-guice/pom.xml
----------------------------------------------------------------------
diff --git a/server/container/guice/cassandra-guice/pom.xml 
b/server/container/guice/cassandra-guice/pom.xml
index 2f49a97..b1bc20f 100644
--- a/server/container/guice/cassandra-guice/pom.xml
+++ b/server/container/guice/cassandra-guice/pom.xml
@@ -278,6 +278,11 @@
                     <artifactId>mockito-core</artifactId>
                     <scope>test</scope>
                 </dependency>
+                <dependency>
+                    <groupId>org.testcontainers</groupId>
+                    <artifactId>testcontainers</artifactId>
+                    <scope>test</scope>
+                </dependency>
             </dependencies>
         </profile>
         <profile>

http://git-wip-us.apache.org/repos/asf/james-project/blob/35816961/server/container/guice/cassandra-guice/src/test/java/org/apache/james/AggregateGuiceModuleTestRule.java
----------------------------------------------------------------------
diff --git 
a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/AggregateGuiceModuleTestRule.java
 
b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/AggregateGuiceModuleTestRule.java
new file mode 100644
index 0000000..b3c4f71
--- /dev/null
+++ 
b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/AggregateGuiceModuleTestRule.java
@@ -0,0 +1,82 @@
+/****************************************************************
+ * 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;
+
+import java.util.List;
+
+import org.junit.rules.RuleChain;
+import org.junit.runner.Description;
+import org.junit.runners.model.Statement;
+
+import com.github.steveash.guavate.Guavate;
+import com.google.common.collect.ImmutableList;
+import com.google.inject.Module;
+import com.google.inject.util.Modules;
+
+
+public class AggregateGuiceModuleTestRule implements GuiceModuleTestRule {
+
+    public static AggregateGuiceModuleTestRule of(GuiceModuleTestRule... 
subrule) {
+        return new AggregateGuiceModuleTestRule(ImmutableList.copyOf(subrule));
+    }
+
+    private final List<GuiceModuleTestRule> subrule;
+    private final RuleChain chain;
+
+    private AggregateGuiceModuleTestRule(List<GuiceModuleTestRule> subrule) {
+        this.subrule = subrule;
+        this.chain = subrule
+                .stream()
+                .reduce(RuleChain.emptyRuleChain(),
+                        RuleChain::around,
+                        RuleChain::around);
+    }
+
+    public AggregateGuiceModuleTestRule aggregate(GuiceModuleTestRule... 
subrule) {
+        List<GuiceModuleTestRule> guiceModules = 
ImmutableList.<GuiceModuleTestRule>builder()
+                .addAll(this.subrule)
+                .add(subrule)
+                .build();
+
+        return new AggregateGuiceModuleTestRule(guiceModules);
+    }
+
+    @Override
+    public Module getModule() {
+        List<Module> modules = subrule
+                    .stream()
+                    .map(GuiceModuleTestRule::getModule)
+                    .collect(Guavate.toImmutableList());
+
+        return Modules.combine(modules);
+    }
+
+    @Override
+    public Statement apply(Statement base, Description description) {
+        return chain.apply(base, description);
+    }
+
+    @Override
+    public void await() {
+        subrule
+            .parallelStream()
+            .forEach(GuiceModuleTestRule::await);
+    }
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/35816961/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraJamesServerTest.java
----------------------------------------------------------------------
diff --git 
a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraJamesServerTest.java
 
b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraJamesServerTest.java
index 41d6b71..579e30c 100644
--- 
a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraJamesServerTest.java
+++ 
b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraJamesServerTest.java
@@ -24,7 +24,7 @@ import org.junit.Rule;
 public class CassandraJamesServerTest extends AbstractJmapJamesServerTest {
 
     @Rule
-    public CassandraJmapTestRule cassandraJmap = new CassandraJmapTestRule();
+    public CassandraJmapTestRule cassandraJmap = 
CassandraJmapTestRule.defaultTestRule();
 
     @Override
     protected JmapJamesServer createJamesServer() {

http://git-wip-us.apache.org/repos/asf/james-project/blob/35816961/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraJmapTestRule.java
----------------------------------------------------------------------
diff --git 
a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraJmapTestRule.java
 
b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraJmapTestRule.java
index 44e7b1f..2ad1b33 100644
--- 
a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraJmapTestRule.java
+++ 
b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraJmapTestRule.java
@@ -18,11 +18,7 @@
  ****************************************************************/
 
 package org.apache.james;
-import org.apache.james.backends.cassandra.EmbeddedCassandra;
-import org.apache.james.mailbox.elasticsearch.EmbeddedElasticSearch;
-import org.apache.james.modules.CassandraJmapServerModule;
-import org.junit.rules.RuleChain;
-import org.junit.rules.TemporaryFolder;
+import org.apache.james.modules.TestJMAPServerModule;
 import org.junit.rules.TestRule;
 import org.junit.runner.Description;
 import org.junit.runners.model.Statement;
@@ -32,37 +28,36 @@ import com.google.inject.Module;
 
 public class CassandraJmapTestRule implements TestRule {
 
-    private TemporaryFolder temporaryFolder = new TemporaryFolder();
-    private EmbeddedElasticSearch embeddedElasticSearch = new 
EmbeddedElasticSearch(temporaryFolder);
-    private EmbeddedCassandra cassandra = 
EmbeddedCassandra.createStartServer();
+    private static final int LIMIT_TO_3_MESSAGES = 3;
 
-    public RuleChain chain = RuleChain
-        .outerRule(temporaryFolder)
-        .around(embeddedElasticSearch);
+    public static CassandraJmapTestRule defaultTestRule() {
+        return new CassandraJmapTestRule(
+                AggregateGuiceModuleTestRule.of(new 
EmbeddedElasticSearchRule(), new EmbeddedCassandraRule()));
+    }
 
-    public JmapJamesServer jmapServer() {
-        return new JmapJamesServer()
-                    
.combineWith(CassandraJamesServerMain.cassandraServerModule)
-                    .overrideWith(new 
CassandraJmapServerModule(temporaryFolder, embeddedElasticSearch, cassandra));
+    private GuiceModuleTestRule guiceModuleTestRule;
+
+    public CassandraJmapTestRule(GuiceModuleTestRule... guiceModuleTestRule) {
+        this.guiceModuleTestRule =
+                AggregateGuiceModuleTestRule
+                    .of(guiceModuleTestRule)
+                    .aggregate(new TempFilesystemTestRule());
     }
 
-    public JmapJamesServer jmapServer(Module additional) {
+    public JmapJamesServer jmapServer(Module... additionals) {
         return new JmapJamesServer()
-            .combineWith(CassandraJamesServerMain.cassandraServerModule, 
additional)
-            .overrideWith(new CassandraJmapServerModule(temporaryFolder, 
embeddedElasticSearch, cassandra));
+            .combineWith(CassandraJamesServerMain.cassandraServerModule)
+            .overrideWith(new TestJMAPServerModule(LIMIT_TO_3_MESSAGES))
+            .overrideWith(guiceModuleTestRule.getModule())
+            .overrideWith(additionals);
     }
 
     @Override
     public Statement apply(Statement base, Description description) {
-        return chain.apply(base, description);
+        return guiceModuleTestRule.apply(base, description);
     }
-    
 
-    public EmbeddedElasticSearch getElasticSearch() {
-        return embeddedElasticSearch;
-    }
-    
     public void await() {
-        embeddedElasticSearch.awaitForElasticSearch();
+        guiceModuleTestRule.await();
     }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/35816961/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraMessageIdManagerInjectionTest.java
----------------------------------------------------------------------
diff --git 
a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraMessageIdManagerInjectionTest.java
 
b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraMessageIdManagerInjectionTest.java
index 7e3b5dd..b5e9dc2 100644
--- 
a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraMessageIdManagerInjectionTest.java
+++ 
b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraMessageIdManagerInjectionTest.java
@@ -41,7 +41,7 @@ import com.google.inject.multibindings.Multibinder;
 public class CassandraMessageIdManagerInjectionTest {
 
     @Rule
-    public CassandraJmapTestRule cassandraJmap = new CassandraJmapTestRule();
+    public CassandraJmapTestRule cassandraJmap = 
CassandraJmapTestRule.defaultTestRule();
     private JmapJamesServer server;
 
     @Before

http://git-wip-us.apache.org/repos/asf/james-project/blob/35816961/server/container/guice/cassandra-guice/src/test/java/org/apache/james/EmbeddedCassandraRule.java
----------------------------------------------------------------------
diff --git 
a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/EmbeddedCassandraRule.java
 
b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/EmbeddedCassandraRule.java
new file mode 100644
index 0000000..c9a65a7
--- /dev/null
+++ 
b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/EmbeddedCassandraRule.java
@@ -0,0 +1,75 @@
+/****************************************************************
+ * 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;
+import javax.inject.Inject;
+import javax.inject.Provider;
+
+import org.apache.james.backends.cassandra.CassandraCluster;
+import org.apache.james.backends.cassandra.EmbeddedCassandra;
+import org.junit.runner.Description;
+import org.junit.runners.model.Statement;
+
+import com.datastax.driver.core.Session;
+import com.google.inject.Module;
+import com.google.inject.Scopes;
+import com.google.inject.util.Modules;
+
+
+public class EmbeddedCassandraRule implements GuiceModuleTestRule {
+
+    public static class SessionProvider implements Provider<Session> {
+
+        private final Session session;
+
+        @Inject
+        private SessionProvider(CassandraCluster cluster) {
+            session = cluster.getConf();
+        }
+
+        @Override
+        public Session get() {
+            return session;
+        }
+    }
+
+    private EmbeddedCassandra cassandra;
+
+    @Override
+    public Statement apply(Statement base, Description description) {
+        return new Statement() {
+            @Override
+            public void evaluate() throws Throwable {
+                cassandra = EmbeddedCassandra.createStartServer();
+                base.evaluate();
+            }
+        };
+    }
+
+    @Override
+    public void await() {
+    }
+
+    @Override
+    public Module getModule() {
+        return Modules.combine(
+                (binder) -> 
binder.bind(EmbeddedCassandra.class).toInstance(cassandra),
+                (binder) -> 
binder.bind(Session.class).toProvider(SessionProvider.class).in(Scopes.SINGLETON));
+    }
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/35816961/server/container/guice/cassandra-guice/src/test/java/org/apache/james/EmbeddedElasticSearchRule.java
----------------------------------------------------------------------
diff --git 
a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/EmbeddedElasticSearchRule.java
 
b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/EmbeddedElasticSearchRule.java
new file mode 100644
index 0000000..efb5508
--- /dev/null
+++ 
b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/EmbeddedElasticSearchRule.java
@@ -0,0 +1,55 @@
+/****************************************************************
+ * 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;
+import org.apache.james.mailbox.elasticsearch.EmbeddedElasticSearch;
+import org.apache.james.modules.TestElasticSearchModule;
+import org.junit.rules.RuleChain;
+import org.junit.rules.TemporaryFolder;
+import org.junit.runner.Description;
+import org.junit.runners.model.Statement;
+
+import com.google.inject.Module;
+
+
+public class EmbeddedElasticSearchRule implements GuiceModuleTestRule {
+
+    private final TemporaryFolder temporaryFolder = new TemporaryFolder();
+    private final EmbeddedElasticSearch embeddedElasticSearch = new 
EmbeddedElasticSearch(temporaryFolder);
+
+    private final RuleChain chain = RuleChain
+        .outerRule(temporaryFolder)
+        .around(embeddedElasticSearch);
+
+    @Override
+    public Statement apply(Statement base, Description description) {
+        return chain.apply(base, description);
+    }
+
+    @Override
+    public void await() {
+        embeddedElasticSearch.awaitForElasticSearch();
+    }
+
+
+    @Override
+    public Module getModule() {
+        return new TestElasticSearchModule(embeddedElasticSearch);
+    }
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/35816961/server/container/guice/cassandra-guice/src/test/java/org/apache/james/GuiceModuleTestRule.java
----------------------------------------------------------------------
diff --git 
a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/GuiceModuleTestRule.java
 
b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/GuiceModuleTestRule.java
new file mode 100644
index 0000000..4b78ea8
--- /dev/null
+++ 
b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/GuiceModuleTestRule.java
@@ -0,0 +1,29 @@
+/****************************************************************
+ * 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;
+
+import org.junit.rules.TestRule;
+
+import com.google.inject.Module;
+
+public interface GuiceModuleTestRule extends TestRule {
+    Module getModule();
+    void await();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/james-project/blob/35816961/server/container/guice/cassandra-guice/src/test/java/org/apache/james/TempFilesystemTestRule.java
----------------------------------------------------------------------
diff --git 
a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/TempFilesystemTestRule.java
 
b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/TempFilesystemTestRule.java
new file mode 100644
index 0000000..4037f0c
--- /dev/null
+++ 
b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/TempFilesystemTestRule.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;
+
+import org.apache.james.modules.TestFilesystemModule;
+import org.junit.rules.TemporaryFolder;
+import org.junit.runner.Description;
+import org.junit.runners.model.Statement;
+
+import com.google.inject.Module;
+
+public class TempFilesystemTestRule implements GuiceModuleTestRule {
+
+    private final TemporaryFolder temporaryFolder;
+
+    public TempFilesystemTestRule() {
+        this.temporaryFolder = new TemporaryFolder();
+    }
+
+    @Override
+    public Statement apply(Statement base, Description description) {
+        return temporaryFolder.apply(base, description);
+    }
+
+    @Override
+    public Module getModule() {
+        return new TestFilesystemModule(temporaryFolder::getRoot);
+    }
+
+    @Override
+    public void await() {
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/35816961/server/container/guice/guice-common/src/main/java/org/apache/james/JmapJamesServer.java
----------------------------------------------------------------------
diff --git 
a/server/container/guice/guice-common/src/main/java/org/apache/james/JmapJamesServer.java
 
b/server/container/guice/guice-common/src/main/java/org/apache/james/JmapJamesServer.java
index 9dabe86..46122a8 100644
--- 
a/server/container/guice/guice-common/src/main/java/org/apache/james/JmapJamesServer.java
+++ 
b/server/container/guice/guice-common/src/main/java/org/apache/james/JmapJamesServer.java
@@ -19,6 +19,7 @@
 package org.apache.james;
 
 import java.util.Arrays;
+import java.util.Collection;
 
 import org.apache.james.utils.JmapGuiceProbe;
 import org.apache.james.utils.WebAdminGuiceProbe;
@@ -42,6 +43,10 @@ public class JmapJamesServer extends GuiceJamesServerImpl 
implements GuiceJamesS
     }
 
     public JmapJamesServer overrideWith(Module... overrides) {
+        return overrideWith(Arrays.asList(overrides));
+    }
+
+    public JmapJamesServer overrideWith(Collection<Module> overrides) {
         return new JmapJamesServer(Modules.override(module).with(overrides));
     }
 
@@ -55,5 +60,5 @@ public class JmapJamesServer extends GuiceJamesServerImpl 
implements GuiceJamesS
         return getGuiceProbeProvider().getProbe(WebAdminGuiceProbe.class);
     }
 
-    
+
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/35816961/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMailboxesMethodTest.java
----------------------------------------------------------------------
diff --git 
a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMailboxesMethodTest.java
 
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMailboxesMethodTest.java
index 67a7cd1..299a8f1 100644
--- 
a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMailboxesMethodTest.java
+++ 
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMailboxesMethodTest.java
@@ -27,7 +27,7 @@ import org.junit.Rule;
 public class CassandraGetMailboxesMethodTest extends GetMailboxesMethodTest {
 
     @Rule 
-    public CassandraJmapTestRule rule = new CassandraJmapTestRule();
+    public CassandraJmapTestRule rule = 
CassandraJmapTestRule.defaultTestRule();
     
     @Override
     protected JmapJamesServer createJmapServer() {

http://git-wip-us.apache.org/repos/asf/james-project/blob/35816961/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessageListMethodTest.java
----------------------------------------------------------------------
diff --git 
a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessageListMethodTest.java
 
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessageListMethodTest.java
index 8d5aa57..cae3a6d 100644
--- 
a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessageListMethodTest.java
+++ 
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessageListMethodTest.java
@@ -27,7 +27,7 @@ import org.junit.Rule;
 public class CassandraGetMessageListMethodTest extends 
GetMessageListMethodTest {
 
     @Rule 
-    public CassandraJmapTestRule rule = new CassandraJmapTestRule();
+    public CassandraJmapTestRule rule = 
CassandraJmapTestRule.defaultTestRule();
     
     @Override
     protected JmapJamesServer createJmapServer() {

http://git-wip-us.apache.org/repos/asf/james-project/blob/35816961/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetVacationResponseTest.java
----------------------------------------------------------------------
diff --git 
a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetVacationResponseTest.java
 
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetVacationResponseTest.java
index 6e52b05..c50f048 100644
--- 
a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetVacationResponseTest.java
+++ 
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetVacationResponseTest.java
@@ -28,7 +28,7 @@ import org.junit.Rule;
 public class CassandraGetVacationResponseTest extends GetVacationResponseTest {
 
     @Rule 
-    public CassandraJmapTestRule rule = new CassandraJmapTestRule();
+    public CassandraJmapTestRule rule = 
CassandraJmapTestRule.defaultTestRule();
     
     @Override
     protected JmapJamesServer createJmapServer(ZonedDateTimeProvider 
zonedDateTimeProvider) {

http://git-wip-us.apache.org/repos/asf/james-project/blob/35816961/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraJmapAuthenticationTest.java
----------------------------------------------------------------------
diff --git 
a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraJmapAuthenticationTest.java
 
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraJmapAuthenticationTest.java
index 28667a3..d4027aa 100644
--- 
a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraJmapAuthenticationTest.java
+++ 
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraJmapAuthenticationTest.java
@@ -28,7 +28,7 @@ import org.junit.Rule;
 public class CassandraJmapAuthenticationTest extends JMAPAuthenticationTest {
 
     @Rule 
-    public CassandraJmapTestRule rule = new CassandraJmapTestRule();
+    public CassandraJmapTestRule rule = 
CassandraJmapTestRule.defaultTestRule();
     
     @Override
     protected JmapJamesServer createJmapServer(FixedDateZonedDateTimeProvider 
zonedDateTimeProvider) {

http://git-wip-us.apache.org/repos/asf/james-project/blob/35816961/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetMailboxesMethodTest.java
----------------------------------------------------------------------
diff --git 
a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetMailboxesMethodTest.java
 
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetMailboxesMethodTest.java
index 10c32e5..02e5333 100644
--- 
a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetMailboxesMethodTest.java
+++ 
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetMailboxesMethodTest.java
@@ -27,7 +27,7 @@ import org.junit.Rule;
 public class CassandraSetMailboxesMethodTest extends SetMailboxesMethodTest {
 
     @Rule 
-    public CassandraJmapTestRule rule = new CassandraJmapTestRule();
+    public CassandraJmapTestRule rule = 
CassandraJmapTestRule.defaultTestRule();
     
     @Override
     protected JmapJamesServer createJmapServer() {

http://git-wip-us.apache.org/repos/asf/james-project/blob/35816961/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetMessagesMethodTest.java
----------------------------------------------------------------------
diff --git 
a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetMessagesMethodTest.java
 
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetMessagesMethodTest.java
index 12b4045..e0e36c5 100644
--- 
a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetMessagesMethodTest.java
+++ 
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetMessagesMethodTest.java
@@ -29,7 +29,7 @@ import org.junit.Rule;
 public class CassandraSetMessagesMethodTest extends SetMessagesMethodTest {
 
     @Rule 
-    public CassandraJmapTestRule rule = new CassandraJmapTestRule();
+    public CassandraJmapTestRule rule = 
CassandraJmapTestRule.defaultTestRule();
 
     @Override
     protected JmapJamesServer createJmapServer() {

http://git-wip-us.apache.org/repos/asf/james-project/blob/35816961/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetVacationResponseTest.java
----------------------------------------------------------------------
diff --git 
a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetVacationResponseTest.java
 
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetVacationResponseTest.java
index 463971f..6300459 100644
--- 
a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetVacationResponseTest.java
+++ 
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetVacationResponseTest.java
@@ -27,7 +27,7 @@ import org.junit.Rule;
 public class CassandraSetVacationResponseTest extends SetVacationResponseTest {
 
     @Rule 
-    public CassandraJmapTestRule rule = new CassandraJmapTestRule();
+    public CassandraJmapTestRule rule = 
CassandraJmapTestRule.defaultTestRule();
     
     @Override
     protected JmapJamesServer createJmapServer() {

http://git-wip-us.apache.org/repos/asf/james-project/blob/35816961/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraVacationIntegrationTest.java
----------------------------------------------------------------------
diff --git 
a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraVacationIntegrationTest.java
 
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraVacationIntegrationTest.java
index c16c96d..adbb077 100644
--- 
a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraVacationIntegrationTest.java
+++ 
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraVacationIntegrationTest.java
@@ -28,7 +28,7 @@ public class CassandraVacationIntegrationTest extends 
VacationIntegrationTest {
 
 
     @Rule 
-    public CassandraJmapTestRule rule = new CassandraJmapTestRule();
+    public CassandraJmapTestRule rule = 
CassandraJmapTestRule.defaultTestRule();
     
     @Override
     protected JmapJamesServer createJmapServer() {

http://git-wip-us.apache.org/repos/asf/james-project/blob/35816961/server/protocols/webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/WebAdminServerIntegrationTest.java
----------------------------------------------------------------------
diff --git 
a/server/protocols/webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/WebAdminServerIntegrationTest.java
 
b/server/protocols/webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/WebAdminServerIntegrationTest.java
index 4e7744e..6bc58fa 100644
--- 
a/server/protocols/webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/WebAdminServerIntegrationTest.java
+++ 
b/server/protocols/webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/WebAdminServerIntegrationTest.java
@@ -52,7 +52,7 @@ public class WebAdminServerIntegrationTest {
     public static final String SPECIFIC_MAILBOX = SPECIFIC_USER + SEPARATOR + 
UserMailboxesRoutes.MAILBOXES + SEPARATOR + MAILBOX;
 
     @Rule
-    public CassandraJmapTestRule cassandraJmapTestRule = new 
CassandraJmapTestRule();
+    public CassandraJmapTestRule cassandraJmapTestRule = 
CassandraJmapTestRule.defaultTestRule();
 
     private JmapJamesServer guiceJamesServer;
 


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

Reply via email to