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 bt...@apache.org on 2020/07/31 09:24:46 UTC
[james-project] 25/28: JAMES-3350 DomainList::autoDetect leads to
slow tests
This is an automated email from the ASF dual-hosted git repository.
btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit b4ae19d0c8b46344ffcc1464bde4a9459eed485a
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Tue Jul 28 17:44:49 2020 +0700
JAMES-3350 DomainList::autoDetect leads to slow tests
Switching it off where not necessary unlocks (locally) a 33s => 3s test speedup.
I don't know if the speedup is as impressive on a CI environment but this test speedup is definitly welcomed!
I ended up testing the hostname retrieval only once on top of the memory server in order to limit the expensiveness of this test.
---
.../AuthenticatedCassandraJamesServerTest.java | 10 +++-----
.../org/apache/james/CassandraJamesServerTest.java | 3 +--
.../org/apache/james/CassandraWithTikaTest.java | 3 +--
.../james/WithCassandraBlobStoreImmutableTest.java | 3 +--
.../apache/james/CassandraLdapJamesServerTest.java | 3 +--
.../james/CassandraLdapJmapJamesServerTest.java | 3 +--
.../james/CassandraRabbitMQJamesServerFixture.java | 10 ++------
.../james/RabbitMQJamesServerReprocessingTest.java | 4 +---
.../org/apache/james/WithCacheImmutableTest.java | 3 +--
.../james/WithCassandraBlobStoreImmutableTest.java | 7 +++---
.../james/WithScanningSearchImmutableTest.java | 7 +++---
.../CassandraRabbitMQLdapJmapJamesServerTest.java | 3 +--
.../java/org/apache/james/JamesServerContract.java | 27 ----------------------
.../java/org/apache/james/JPAJamesServerTest.java | 2 +-
...WithAuthenticatedDatabaseSqlValidationTest.java | 2 +-
...atabaseAuthenticaticationSqlValidationTest.java | 2 +-
.../org/apache/james/MemoryJamesServerTest.java | 3 +--
.../apache/james/MemoryJmapJamesServerTest.java | 4 +---
.../james/jmap/draft/JmapJamesServerContract.java | 8 -------
...RabbitMQReindexingWithEventDeadLettersTest.java | 2 --
20 files changed, 24 insertions(+), 85 deletions(-)
diff --git a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/AuthenticatedCassandraJamesServerTest.java b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/AuthenticatedCassandraJamesServerTest.java
index 79a8049..79e9a62 100644
--- a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/AuthenticatedCassandraJamesServerTest.java
+++ b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/AuthenticatedCassandraJamesServerTest.java
@@ -19,7 +19,6 @@
package org.apache.james;
-import static org.apache.james.JamesServerContract.DOMAIN_LIST_CONFIGURATION_MODULE;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import org.apache.james.backends.cassandra.DockerCassandra;
@@ -44,8 +43,7 @@ class AuthenticatedCassandraJamesServerTest {
JamesServerExtension testExtension = TestingDistributedJamesServerBuilder.withSearchConfiguration(SearchConfiguration.elasticSearch())
.extension(new DockerElasticSearchExtension())
.extension(cassandraExtension)
- .server(configuration -> CassandraJamesServerMain.createServer(configuration)
- .overrideWith(DOMAIN_LIST_CONFIGURATION_MODULE))
+ .server(CassandraJamesServerMain::createServer)
.overrideServerModule(binder -> binder.bind(ClusterConfiguration.class)
.toInstance(DockerCassandra.configurationBuilder(cassandraExtension.getCassandra().getHost())
.username(CASSANDRA_USER)
@@ -61,8 +59,7 @@ class AuthenticatedCassandraJamesServerTest {
.extension(new DockerElasticSearchExtension())
.extension(cassandraExtension)
.disableAutoStart()
- .server(configuration -> CassandraJamesServerMain.createServer(configuration)
- .overrideWith(DOMAIN_LIST_CONFIGURATION_MODULE))
+ .server(CassandraJamesServerMain::createServer)
.overrideServerModule(binder -> binder.bind(ClusterConfiguration.class)
.toInstance(DockerCassandra.configurationBuilder(cassandraExtension.getCassandra().getHost())
.username(CASSANDRA_USER)
@@ -87,8 +84,7 @@ class AuthenticatedCassandraJamesServerTest {
.extension(cassandraExtension)
.disableAutoStart()
.server(configuration -> CassandraJamesServerMain.createServer(configuration)
- .overrideWith(new TestJMAPServerModule())
- .overrideWith(DOMAIN_LIST_CONFIGURATION_MODULE))
+ .overrideWith(new TestJMAPServerModule()))
.overrideServerModule(binder -> binder.bind(ClusterConfiguration.class)
.toInstance(DockerCassandra.configurationBuilder(cassandraExtension.getCassandra().getHost())
.username(CASSANDRA_USER)
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 380cd18..e9db66f 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
@@ -33,8 +33,7 @@ class CassandraJamesServerTest implements JamesServerContract, JmapJamesServerCo
.extension(new DockerElasticSearchExtension())
.extension(new CassandraExtension())
.server(configuration -> CassandraJamesServerMain.createServer(configuration)
- .overrideWith(new TestJMAPServerModule())
- .overrideWith(JamesServerContract.DOMAIN_LIST_CONFIGURATION_MODULE))
+ .overrideWith(new TestJMAPServerModule()))
.lifeCycle(JamesServerExtension.Lifecycle.PER_CLASS)
.build();
diff --git a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraWithTikaTest.java b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraWithTikaTest.java
index 9467786..7979d5d 100644
--- a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraWithTikaTest.java
+++ b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/CassandraWithTikaTest.java
@@ -29,8 +29,7 @@ class CassandraWithTikaTest implements JamesServerContract {
.extension(new TikaExtension())
.extension(new DockerElasticSearchExtension())
.server(configuration -> CassandraJamesServerMain.createServer(configuration)
- .overrideWith(new TestJMAPServerModule())
- .overrideWith(DOMAIN_LIST_CONFIGURATION_MODULE))
+ .overrideWith(new TestJMAPServerModule()))
.lifeCycle(JamesServerExtension.Lifecycle.PER_CLASS)
.build();
}
diff --git a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/WithCassandraBlobStoreImmutableTest.java b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/WithCassandraBlobStoreImmutableTest.java
index 884e061..ce408f8 100644
--- a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/WithCassandraBlobStoreImmutableTest.java
+++ b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/WithCassandraBlobStoreImmutableTest.java
@@ -36,7 +36,6 @@ class WithCassandraBlobStoreImmutableTest implements JmapJamesServerContract, Ja
.extension(new CassandraExtension())
.extension(new SpamAssassinModuleExtension())
.server(configuration -> CassandraJamesServerMain.createServer(configuration)
- .overrideWith(new TestJMAPServerModule())
- .overrideWith(JmapJamesServerContract.DOMAIN_LIST_CONFIGURATION_MODULE));
+ .overrideWith(new TestJMAPServerModule()));
}
}
diff --git a/server/container/guice/cassandra-ldap-guice/src/test/java/org/apache/james/CassandraLdapJamesServerTest.java b/server/container/guice/cassandra-ldap-guice/src/test/java/org/apache/james/CassandraLdapJamesServerTest.java
index 7d5e782..35f7306 100644
--- a/server/container/guice/cassandra-ldap-guice/src/test/java/org/apache/james/CassandraLdapJamesServerTest.java
+++ b/server/container/guice/cassandra-ldap-guice/src/test/java/org/apache/james/CassandraLdapJamesServerTest.java
@@ -58,8 +58,7 @@ class CassandraLdapJamesServerTest implements JamesServerContract {
.extension(new CassandraExtension())
.extension(new LdapTestExtension())
.server(configuration -> CassandraLdapJamesServerMain.createServer(configuration)
- .overrideWith(new TestJMAPServerModule())
- .overrideWith(DOMAIN_LIST_CONFIGURATION_MODULE))
+ .overrideWith(new TestJMAPServerModule()))
.build();
@Test
diff --git a/server/container/guice/cassandra-ldap-guice/src/test/java/org/apache/james/CassandraLdapJmapJamesServerTest.java b/server/container/guice/cassandra-ldap-guice/src/test/java/org/apache/james/CassandraLdapJmapJamesServerTest.java
index 7c537b0..c65424d 100644
--- a/server/container/guice/cassandra-ldap-guice/src/test/java/org/apache/james/CassandraLdapJmapJamesServerTest.java
+++ b/server/container/guice/cassandra-ldap-guice/src/test/java/org/apache/james/CassandraLdapJmapJamesServerTest.java
@@ -30,7 +30,6 @@ class CassandraLdapJmapJamesServerTest implements JmapJamesServerContract {
.extension(new CassandraExtension())
.extension(new LdapTestExtension())
.server(configuration -> CassandraLdapJamesServerMain.createServer(configuration)
- .overrideWith(new TestJMAPServerModule())
- .overrideWith(DOMAIN_LIST_CONFIGURATION_MODULE))
+ .overrideWith(new TestJMAPServerModule()))
.build();
}
diff --git a/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/CassandraRabbitMQJamesServerFixture.java b/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/CassandraRabbitMQJamesServerFixture.java
index b9878db..a07800b 100644
--- a/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/CassandraRabbitMQJamesServerFixture.java
+++ b/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/CassandraRabbitMQJamesServerFixture.java
@@ -19,18 +19,11 @@
package org.apache.james;
-import org.apache.james.jmap.draft.JmapJamesServerContract;
import org.apache.james.modules.RabbitMQExtension;
import org.apache.james.modules.TestJMAPServerModule;
import org.apache.james.modules.blobstore.BlobStoreConfiguration;
public class CassandraRabbitMQJamesServerFixture {
-
- private static final JamesServerBuilder.ServerProvider<CassandraRabbitMQJamesConfiguration> SERVER_PROVIDER =
- configuration -> CassandraRabbitMQJamesServerMain.createServer(configuration)
- .overrideWith(new TestJMAPServerModule())
- .overrideWith(JmapJamesServerContract.DOMAIN_LIST_CONFIGURATION_MODULE);
-
public static JamesServerBuilder<CassandraRabbitMQJamesConfiguration> baseExtensionBuilder() {
return baseExtensionBuilder(new RabbitMQExtension());
}
@@ -49,6 +42,7 @@ public class CassandraRabbitMQJamesServerFixture {
.extension(new DockerElasticSearchExtension())
.extension(new CassandraExtension())
.extension(rabbitMQExtension)
- .server(SERVER_PROVIDER);
+ .server(configuration -> CassandraRabbitMQJamesServerMain.createServer(configuration)
+ .overrideWith(new TestJMAPServerModule()));
}
}
diff --git a/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/RabbitMQJamesServerReprocessingTest.java b/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/RabbitMQJamesServerReprocessingTest.java
index 945cdb0..d383cc5 100644
--- a/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/RabbitMQJamesServerReprocessingTest.java
+++ b/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/RabbitMQJamesServerReprocessingTest.java
@@ -22,7 +22,6 @@ package org.apache.james;
import static io.restassured.config.ParamConfig.UpdateStrategy.REPLACE;
import static org.assertj.core.api.Assertions.assertThat;
-import org.apache.james.jmap.draft.JmapJamesServerContract;
import org.apache.james.mailrepository.api.MailRepositoryUrl;
import org.apache.james.modules.AwsS3BlobStoreExtension;
import org.apache.james.modules.RabbitMQExtension;
@@ -57,8 +56,7 @@ class RabbitMQJamesServerReprocessingTest {
.extension(new AwsS3BlobStoreExtension())
.server(configuration -> CassandraRabbitMQJamesServerMain.createServer(configuration)
.overrideWith(new TestJMAPServerModule())
- .overrideWith(binder -> binder.bind(WebAdminConfiguration.class).toInstance(WebAdminConfiguration.TEST_CONFIGURATION))
- .overrideWith(JmapJamesServerContract.DOMAIN_LIST_CONFIGURATION_MODULE))
+ .overrideWith(binder -> binder.bind(WebAdminConfiguration.class).toInstance(WebAdminConfiguration.TEST_CONFIGURATION)))
.build();
@BeforeEach
diff --git a/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/WithCacheImmutableTest.java b/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/WithCacheImmutableTest.java
index 5dbcf14..889b46e 100644
--- a/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/WithCacheImmutableTest.java
+++ b/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/WithCacheImmutableTest.java
@@ -49,7 +49,6 @@ class WithCacheImmutableTest implements JmapJamesServerContract, JamesServerCont
.extension(new RabbitMQExtension())
.extension(new AwsS3BlobStoreExtension())
.server(configuration -> CassandraRabbitMQJamesServerMain.createServer(configuration)
- .overrideWith(new TestJMAPServerModule())
- .overrideWith(JmapJamesServerContract.DOMAIN_LIST_CONFIGURATION_MODULE));
+ .overrideWith(new TestJMAPServerModule()));
}
}
\ No newline at end of file
diff --git a/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/WithCassandraBlobStoreImmutableTest.java b/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/WithCassandraBlobStoreImmutableTest.java
index f6d1ed6..cb3a5f1 100644
--- a/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/WithCassandraBlobStoreImmutableTest.java
+++ b/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/WithCassandraBlobStoreImmutableTest.java
@@ -39,11 +39,10 @@ public class WithCassandraBlobStoreImmutableTest implements JmapJamesServerContr
.blobStore(BlobStoreConfiguration.cassandra())
.searchConfiguration(SearchConfiguration.elasticSearch())
.build())
+ .server(configuration -> CassandraRabbitMQJamesServerMain.createServer(configuration)
+ .overrideWith(new TestJMAPServerModule()))
.extension(new DockerElasticSearchExtension())
.extension(new CassandraExtension())
- .extension(new RabbitMQExtension())
- .server(configuration -> CassandraRabbitMQJamesServerMain.createServer(configuration)
- .overrideWith(new TestJMAPServerModule())
- .overrideWith(JmapJamesServerContract.DOMAIN_LIST_CONFIGURATION_MODULE));
+ .extension(new RabbitMQExtension());
}
}
diff --git a/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/WithScanningSearchImmutableTest.java b/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/WithScanningSearchImmutableTest.java
index 90fddc6..45896b2 100644
--- a/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/WithScanningSearchImmutableTest.java
+++ b/server/container/guice/cassandra-rabbitmq-guice/src/test/java/org/apache/james/WithScanningSearchImmutableTest.java
@@ -38,12 +38,11 @@ class WithScanningSearchImmutableTest implements JmapJamesServerContract, JamesS
.deduplication())
.searchConfiguration(SearchConfiguration.scanning())
.build())
+ .server(configuration -> CassandraRabbitMQJamesServerMain.createServer(configuration)
+ .overrideWith(new TestJMAPServerModule()))
.extension(new CassandraExtension())
.extension(new RabbitMQExtension())
- .extension(new AwsS3BlobStoreExtension())
- .server(configuration -> CassandraRabbitMQJamesServerMain.createServer(configuration)
- .overrideWith(new TestJMAPServerModule())
- .overrideWith(JmapJamesServerContract.DOMAIN_LIST_CONFIGURATION_MODULE));
+ .extension(new AwsS3BlobStoreExtension());
}
@RegisterExtension
diff --git a/server/container/guice/cassandra-rabbitmq-ldap-guice/src/test/java/org/apache/james/CassandraRabbitMQLdapJmapJamesServerTest.java b/server/container/guice/cassandra-rabbitmq-ldap-guice/src/test/java/org/apache/james/CassandraRabbitMQLdapJmapJamesServerTest.java
index 36becc4..be9e201 100644
--- a/server/container/guice/cassandra-rabbitmq-ldap-guice/src/test/java/org/apache/james/CassandraRabbitMQLdapJmapJamesServerTest.java
+++ b/server/container/guice/cassandra-rabbitmq-ldap-guice/src/test/java/org/apache/james/CassandraRabbitMQLdapJmapJamesServerTest.java
@@ -104,7 +104,6 @@ class CassandraRabbitMQLdapJmapJamesServerTest {
.extension(new RabbitMQExtension())
.extension(new LdapTestExtension())
.server(configuration -> CassandraRabbitMQLdapJamesServerMain.createServer(configuration)
- .overrideWith(new TestJMAPServerModule())
- .overrideWith(JmapJamesServerContract.DOMAIN_LIST_CONFIGURATION_MODULE));
+ .overrideWith(new TestJMAPServerModule()));
}
}
diff --git a/server/container/guice/guice-common/src/test/java/org/apache/james/JamesServerContract.java b/server/container/guice/guice-common/src/test/java/org/apache/james/JamesServerContract.java
index 0ca7964..0f241d8 100644
--- a/server/container/guice/guice-common/src/test/java/org/apache/james/JamesServerContract.java
+++ b/server/container/guice/guice-common/src/test/java/org/apache/james/JamesServerContract.java
@@ -21,46 +21,19 @@ package org.apache.james;
import static org.assertj.core.api.Assertions.assertThat;
import java.io.IOException;
-import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.SocketChannel;
import java.nio.charset.Charset;
-import org.apache.james.domainlist.lib.DomainListConfiguration;
import org.apache.james.modules.protocols.ImapGuiceProbe;
import org.apache.james.modules.protocols.LmtpGuiceProbe;
import org.apache.james.modules.protocols.Pop3GuiceProbe;
import org.apache.james.modules.protocols.SmtpGuiceProbe;
-import org.apache.james.utils.DataProbeImpl;
import org.junit.jupiter.api.Test;
-import com.google.inject.Module;
-
public interface JamesServerContract {
-
String JAMES_SERVER_HOST = "127.0.0.1";
- Module DOMAIN_LIST_CONFIGURATION_MODULE = binder -> binder.bind(DomainListConfiguration.class)
- .toInstance(DomainListConfiguration.builder()
- .autoDetect(true)
- .autoDetectIp(false)
- .build());
-
- @Test
- default void hostnameShouldBeUsedAsDefaultDomain(GuiceJamesServer jamesServer) throws Exception {
- String expectedDefaultDomain = InetAddress.getLocalHost().getHostName();
-
- assertThat(jamesServer.getProbe(DataProbeImpl.class).getDefaultDomain()).isEqualTo(expectedDefaultDomain);
- }
-
- @Test
- default void hostnameShouldBeRetrievedWhenRestarting(GuiceJamesServer jamesServer) throws Exception {
- jamesServer.stop();
- jamesServer.start();
- String expectedDefaultDomain = InetAddress.getLocalHost().getHostName();
-
- assertThat(jamesServer.getProbe(DataProbeImpl.class).getDefaultDomain()).isEqualTo(expectedDefaultDomain);
- }
@Test
default void connectIMAPServerShouldSendShabangOnConnect(GuiceJamesServer jamesServer) throws Exception {
diff --git a/server/container/guice/jpa-guice/src/test/java/org/apache/james/JPAJamesServerTest.java b/server/container/guice/jpa-guice/src/test/java/org/apache/james/JPAJamesServerTest.java
index f13a9ea..529e814 100644
--- a/server/container/guice/jpa-guice/src/test/java/org/apache/james/JPAJamesServerTest.java
+++ b/server/container/guice/jpa-guice/src/test/java/org/apache/james/JPAJamesServerTest.java
@@ -42,7 +42,7 @@ class JPAJamesServerTest implements JamesServerContract {
@RegisterExtension
static JamesServerExtension jamesServerExtension = new JamesServerBuilder<>(JamesServerBuilder.defaultConfigurationProvider())
.server(configuration -> JPAJamesServerMain.createServer(configuration)
- .overrideWith(new TestJPAConfigurationModule(), DOMAIN_LIST_CONFIGURATION_MODULE))
+ .overrideWith(new TestJPAConfigurationModule()))
.lifeCycle(JamesServerExtension.Lifecycle.PER_CLASS)
.build();
diff --git a/server/container/guice/jpa-guice/src/test/java/org/apache/james/JPAJamesServerWithAuthenticatedDatabaseSqlValidationTest.java b/server/container/guice/jpa-guice/src/test/java/org/apache/james/JPAJamesServerWithAuthenticatedDatabaseSqlValidationTest.java
index 4880eef..d8359e4 100644
--- a/server/container/guice/jpa-guice/src/test/java/org/apache/james/JPAJamesServerWithAuthenticatedDatabaseSqlValidationTest.java
+++ b/server/container/guice/jpa-guice/src/test/java/org/apache/james/JPAJamesServerWithAuthenticatedDatabaseSqlValidationTest.java
@@ -26,7 +26,7 @@ class JPAJamesServerWithAuthenticatedDatabaseSqlValidationTest extends JPAJamesS
@RegisterExtension
static JamesServerExtension jamesServerExtension = new JamesServerBuilder<>(JamesServerBuilder.defaultConfigurationProvider())
.server(configuration -> JPAJamesServerMain.createServer(configuration)
- .overrideWith(new TestJPAConfigurationModuleWithSqlValidation.WithDatabaseAuthentication(), DOMAIN_LIST_CONFIGURATION_MODULE))
+ .overrideWith(new TestJPAConfigurationModuleWithSqlValidation.WithDatabaseAuthentication()))
.lifeCycle(JamesServerExtension.Lifecycle.PER_CLASS)
.build();
}
diff --git a/server/container/guice/jpa-guice/src/test/java/org/apache/james/JPAJamesServerWithNoDatabaseAuthenticaticationSqlValidationTest.java b/server/container/guice/jpa-guice/src/test/java/org/apache/james/JPAJamesServerWithNoDatabaseAuthenticaticationSqlValidationTest.java
index 4e941db..89f4dc0 100644
--- a/server/container/guice/jpa-guice/src/test/java/org/apache/james/JPAJamesServerWithNoDatabaseAuthenticaticationSqlValidationTest.java
+++ b/server/container/guice/jpa-guice/src/test/java/org/apache/james/JPAJamesServerWithNoDatabaseAuthenticaticationSqlValidationTest.java
@@ -26,7 +26,7 @@ class JPAJamesServerWithNoDatabaseAuthenticaticationSqlValidationTest extends JP
@RegisterExtension
static JamesServerExtension jamesServerExtension = new JamesServerBuilder<>(JamesServerBuilder.defaultConfigurationProvider())
.server(configuration -> JPAJamesServerMain.createServer(configuration)
- .overrideWith(new TestJPAConfigurationModuleWithSqlValidation.NoDatabaseAuthentication(), DOMAIN_LIST_CONFIGURATION_MODULE))
+ .overrideWith(new TestJPAConfigurationModuleWithSqlValidation.NoDatabaseAuthentication()))
.lifeCycle(JamesServerExtension.Lifecycle.PER_CLASS)
.build();
}
diff --git a/server/container/guice/memory-guice/src/test/java/org/apache/james/MemoryJamesServerTest.java b/server/container/guice/memory-guice/src/test/java/org/apache/james/MemoryJamesServerTest.java
index 8b1d9c7..a29620d 100644
--- a/server/container/guice/memory-guice/src/test/java/org/apache/james/MemoryJamesServerTest.java
+++ b/server/container/guice/memory-guice/src/test/java/org/apache/james/MemoryJamesServerTest.java
@@ -26,8 +26,7 @@ class MemoryJamesServerTest implements JamesServerContract {
@RegisterExtension
static JamesServerExtension jamesServerExtension = new JamesServerBuilder<>(JamesServerBuilder.defaultConfigurationProvider())
.server(configuration -> MemoryJamesServerMain.createServer(configuration)
- .overrideWith(new TestJMAPServerModule())
- .overrideWith(DOMAIN_LIST_CONFIGURATION_MODULE))
+ .overrideWith(new TestJMAPServerModule()))
.lifeCycle(JamesServerExtension.Lifecycle.PER_CLASS)
.build();
}
diff --git a/server/container/guice/memory-guice/src/test/java/org/apache/james/MemoryJmapJamesServerTest.java b/server/container/guice/memory-guice/src/test/java/org/apache/james/MemoryJmapJamesServerTest.java
index 56ccb28..274d6f0 100644
--- a/server/container/guice/memory-guice/src/test/java/org/apache/james/MemoryJmapJamesServerTest.java
+++ b/server/container/guice/memory-guice/src/test/java/org/apache/james/MemoryJmapJamesServerTest.java
@@ -19,7 +19,6 @@
package org.apache.james;
-import static org.apache.james.jmap.draft.JmapJamesServerContract.DOMAIN_LIST_CONFIGURATION_MODULE;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
@@ -36,8 +35,7 @@ class MemoryJmapJamesServerTest {
private static JamesServerBuilder extensionBuilder() {
return new JamesServerBuilder<>(JamesServerBuilder.defaultConfigurationProvider())
.server(configuration -> MemoryJamesServerMain.createServer(configuration)
- .overrideWith(new TestJMAPServerModule())
- .overrideWith(DOMAIN_LIST_CONFIGURATION_MODULE));
+ .overrideWith(new TestJMAPServerModule()));
}
@Nested
diff --git a/server/container/guice/protocols/jmap/src/test/java/org/apache/james/jmap/draft/JmapJamesServerContract.java b/server/container/guice/protocols/jmap/src/test/java/org/apache/james/jmap/draft/JmapJamesServerContract.java
index f9d7301..2d0f7ac 100644
--- a/server/container/guice/protocols/jmap/src/test/java/org/apache/james/jmap/draft/JmapJamesServerContract.java
+++ b/server/container/guice/protocols/jmap/src/test/java/org/apache/james/jmap/draft/JmapJamesServerContract.java
@@ -25,22 +25,14 @@ import static io.restassured.config.RestAssuredConfig.newConfig;
import java.nio.charset.StandardCharsets;
import org.apache.james.GuiceJamesServer;
-import org.apache.james.domainlist.lib.DomainListConfiguration;
import org.junit.jupiter.api.Test;
-import com.google.inject.Module;
-
import io.restassured.RestAssured;
import io.restassured.builder.RequestSpecBuilder;
import io.restassured.http.ContentType;
import io.restassured.specification.RequestSpecification;
public interface JmapJamesServerContract {
- Module DOMAIN_LIST_CONFIGURATION_MODULE = binder -> binder.bind(DomainListConfiguration.class)
- .toInstance(DomainListConfiguration.builder()
- .autoDetect(true)
- .autoDetectIp(false)
- .build());
String JAMES_SERVER_HOST = "127.0.0.1";
@Test
diff --git a/server/protocols/webadmin-integration-test/distributed-webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/rabbitmq/RabbitMQReindexingWithEventDeadLettersTest.java b/server/protocols/webadmin-integration-test/distributed-webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/rabbitmq/RabbitMQReindexingWithEventDeadLettersTest.java
index 20ca0b6..8bbb952 100644
--- a/server/protocols/webadmin-integration-test/distributed-webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/rabbitmq/RabbitMQReindexingWithEventDeadLettersTest.java
+++ b/server/protocols/webadmin-integration-test/distributed-webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/rabbitmq/RabbitMQReindexingWithEventDeadLettersTest.java
@@ -43,7 +43,6 @@ import org.apache.james.SearchConfiguration;
import org.apache.james.jmap.AccessToken;
import org.apache.james.jmap.LocalHostURIBuilder;
import org.apache.james.jmap.draft.JmapGuiceProbe;
-import org.apache.james.jmap.draft.JmapJamesServerContract;
import org.apache.james.junit.categories.BasicFeature;
import org.apache.james.mailbox.events.RetryBackoffConfiguration;
import org.apache.james.modules.AwsS3BlobStoreExtension;
@@ -100,7 +99,6 @@ class RabbitMQReindexingWithEventDeadLettersTest {
.extension(new AwsS3BlobStoreExtension(PayloadCodecFactory.AES256))
.server(configuration -> CassandraRabbitMQJamesServerMain.createServer(configuration)
.overrideWith(new TestJMAPServerModule())
- .overrideWith(JmapJamesServerContract.DOMAIN_LIST_CONFIGURATION_MODULE)
.overrideWith(new WebadminIntegrationTestModule())
.overrideWith(binder -> binder.bind(RetryBackoffConfiguration.class)
.toInstance(RetryBackoffConfiguration.builder()
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org