james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rouaz...@apache.org
Subject [6/9] james-project git commit: JAMES-2178 Restart cassandra after 20 tests in CassandraMessageMapperTest
Date Tue, 10 Oct 2017 15:17:58 GMT
JAMES-2178 Restart cassandra after 20 tests in CassandraMessageMapperTest


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

Branch: refs/heads/master
Commit: f688cc78accbc5c7915aa6e07ec576785c0f0127
Parents: 4b1552d
Author: benwa <btellier@linagora.com>
Authored: Tue Oct 10 15:20:35 2017 +0700
Committer: benwa <btellier@linagora.com>
Committed: Tue Oct 10 17:51:07 2017 +0700

----------------------------------------------------------------------
 .../cassandra/mail/CassandraMessageMapperTest.java     | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/f688cc78/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageMapperTest.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageMapperTest.java
b/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageMapperTest.java
index 36710cc..97aed9c 100644
--- a/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageMapperTest.java
+++ b/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageMapperTest.java
@@ -20,6 +20,7 @@
 package org.apache.james.mailbox.cassandra.mail;
 
 import org.apache.james.backends.cassandra.CassandraCluster;
+import org.apache.james.backends.cassandra.ContainerLifecycleConfiguration;
 import org.apache.james.backends.cassandra.DockerCassandraRule;
 import org.apache.james.backends.cassandra.init.CassandraModuleComposite;
 import org.apache.james.mailbox.cassandra.modules.CassandraAclModule;
@@ -40,11 +41,21 @@ import org.apache.james.mailbox.store.mail.model.MessageMapperTest;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.rules.TestRule;
 
 public class CassandraMessageMapperTest extends MessageMapperTest {
     
     @ClassRule public static DockerCassandraRule cassandraServer = new DockerCassandraRule();
-    
+
+    public static ContainerLifecycleConfiguration cassandraLifecycleConfiguration = ContainerLifecycleConfiguration.builder()
+        .iterationsBetweenRestart(20)
+        .container(cassandraServer.getRawContainer())
+        .build();
+
+    @Rule
+    public TestRule cassandraLifecycleTestRule = cassandraLifecycleConfiguration.asTestRule();
+
     private CassandraCluster cassandra;
 
     @Before


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


Mime
View raw message