You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ro...@apache.org on 2018/12/03 10:17:24 UTC

[02/10] james-project git commit: JAMES-2612 Prove that move & copy configuration batch sizes are not loaded

JAMES-2612 Prove that move & copy configuration batch sizes are not loaded


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

Branch: refs/heads/master
Commit: dbe9c62e2848b71eeb3ea6abba1308d7d8d91913
Parents: 917a34e
Author: Antoine Duprat <ad...@linagora.com>
Authored: Wed Nov 28 12:16:27 2018 +0100
Committer: Raphael Ouazana <ra...@linagora.com>
Committed: Mon Dec 3 11:16:29 2018 +0100

----------------------------------------------------------------------
 .../org/apache/james/CassandraJamesServerTest.java | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/dbe9c62e/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 8db9fe1..7e1dbac 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
@@ -20,10 +20,13 @@
 package org.apache.james;
 
 import static org.apache.james.CassandraJamesServerMain.ALL_BUT_JMX_CASSANDRA_MODULE;
+import static org.assertj.core.api.Assertions.assertThat;
 
 import org.apache.james.mailbox.extractor.TextExtractor;
 import org.apache.james.mailbox.store.search.PDFTextExtractor;
+import org.apache.james.modules.ConfigurationProbe;
 import org.apache.james.modules.TestJMAPServerModule;
+import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 
 class CassandraJamesServerTest implements JamesServerContract {
@@ -39,4 +42,18 @@ class CassandraJamesServerTest implements JamesServerContract {
             .overrideWith(new TestJMAPServerModule(LIMIT_TO_10_MESSAGES))
             .overrideWith(DOMAIN_LIST_CONFIGURATION_MODULE))
         .build();
+
+    @Test
+    void moveBatchSizeShouldEqualsConfigurationValue(GuiceJamesServer jamesServer) {
+        int moveBatchSize = jamesServer.getProbe(ConfigurationProbe.class).getMoveBatchSize();
+        // is 100 in batchsizes.properties configuration file
+        assertThat(moveBatchSize).isEqualTo(200);
+    }
+
+    @Test
+    void copyBatchSizeShouldEqualsConfigurationValue(GuiceJamesServer jamesServer) {
+        int copyBatchSize = jamesServer.getProbe(ConfigurationProbe.class).getCopyBatchSize();
+        // is 100 in batchsizes.properties configuration file
+        assertThat(copyBatchSize).isEqualTo(200);
+    }
 }


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