james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rouaz...@apache.org
Subject [james-project] 04/09: JAMES-2314 awaitInitializationis already called in `WebAdminServer::start`
Date Tue, 11 Jun 2019 13:22:34 GMT
This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 4fb8bbfbd2d267c7a3b95286385fbe22846e6ebc
Author: Benoit Tellier <btellier@linagora.com>
AuthorDate: Wed Jun 5 15:40:12 2019 +0700

    JAMES-2314 awaitInitializationis already called in `WebAdminServer::start`
    
    Thus the await method is useless.
---
 .../src/main/java/org/apache/james/utils/WebAdminGuiceProbe.java     | 1 -
 .../apache/james/webadmin/routes/CassandraMappingsRoutesTest.java    | 4 +---
 .../apache/james/webadmin/routes/CassandraMigrationRoutesTest.java   | 5 ++---
 .../src/main/java/org/apache/james/webadmin/WebAdminServer.java      | 4 ----
 .../test/java/org/apache/james/webadmin/routes/ErrorRoutesTest.java  | 1 -
 .../java/org/apache/james/webadmin/routes/HealthCheckRoutesTest.java | 1 -
 .../test/java/org/apache/james/webadmin/routes/TasksRoutesTest.java  | 1 -
 .../test/java/org/apache/james/webadmin/routes/AliasRoutesTest.java  | 3 +--
 .../org/apache/james/webadmin/routes/DLPConfigurationRoutesTest.java | 3 +--
 .../org/apache/james/webadmin/routes/DomainMappingsRoutesTest.java   | 3 +--
 .../java/org/apache/james/webadmin/routes/DomainsRoutesTest.java     | 3 +--
 .../java/org/apache/james/webadmin/routes/ForwardRoutesTest.java     | 3 +--
 .../test/java/org/apache/james/webadmin/routes/GroupsRoutesTest.java | 3 +--
 .../java/org/apache/james/webadmin/routes/SieveQuotaRoutesTest.java  | 5 ++---
 .../java/org/apache/james/webadmin/routes/SieveScriptRoutesTest.java | 1 -
 .../test/java/org/apache/james/webadmin/routes/UsersRoutesTest.java  | 3 +--
 .../james/webadmin/vault/routes/DeletedMessagesVaultRoutesTest.java  | 1 -
 .../james/webadmin/routes/DomainQuotaRoutesNoVirtualHostingTest.java | 2 +-
 .../org/apache/james/webadmin/routes/EventDeadLettersRoutesTest.java | 3 +--
 .../java/org/apache/james/webadmin/routes/ReindexingRoutesTest.java  | 3 +--
 .../org/apache/james/webadmin/routes/UserMailboxesRoutesTest.java    | 1 -
 .../apache/james/webadmin/routes/WebAdminQuotaSearchTestSystem.java  | 1 -
 .../java/org/apache/james/webadmin/routes/MailQueueRoutesTest.java   | 3 +--
 .../org/apache/james/webadmin/routes/MailRepositoriesRoutesTest.java | 1 -
 24 files changed, 16 insertions(+), 43 deletions(-)

diff --git a/server/container/guice/protocols/webadmin/src/main/java/org/apache/james/utils/WebAdminGuiceProbe.java
b/server/container/guice/protocols/webadmin/src/main/java/org/apache/james/utils/WebAdminGuiceProbe.java
index f5c64ab..beeb147 100644
--- a/server/container/guice/protocols/webadmin/src/main/java/org/apache/james/utils/WebAdminGuiceProbe.java
+++ b/server/container/guice/protocols/webadmin/src/main/java/org/apache/james/utils/WebAdminGuiceProbe.java
@@ -33,7 +33,6 @@ public class WebAdminGuiceProbe implements GuiceProbe {
     }
 
     public Port getWebAdminPort() {
-        webAdminServer.await();
         return webAdminServer.getPort();
     }
 }
diff --git a/server/protocols/webadmin/webadmin-cassandra-data/src/test/java/org/apache/james/webadmin/routes/CassandraMappingsRoutesTest.java
b/server/protocols/webadmin/webadmin-cassandra-data/src/test/java/org/apache/james/webadmin/routes/CassandraMappingsRoutesTest.java
index 7fab886..b1afff9 100644
--- a/server/protocols/webadmin/webadmin-cassandra-data/src/test/java/org/apache/james/webadmin/routes/CassandraMappingsRoutesTest.java
+++ b/server/protocols/webadmin/webadmin-cassandra-data/src/test/java/org/apache/james/webadmin/routes/CassandraMappingsRoutesTest.java
@@ -26,7 +26,6 @@ import static org.assertj.core.api.Assertions.assertThat;
 import static org.hamcrest.Matchers.is;
 import static org.hamcrest.Matchers.notNullValue;
 
-import org.apache.commons.configuration.ConfigurationException;
 import org.apache.james.backends.cassandra.CassandraCluster;
 import org.apache.james.backends.cassandra.CassandraClusterExtension;
 import org.apache.james.backends.cassandra.utils.CassandraUtils;
@@ -70,7 +69,7 @@ class CassandraMappingsRoutesTest {
     static CassandraClusterExtension cassandraCluster = new CassandraClusterExtension(CassandraRRTModule.MODULE);
 
     @BeforeEach
-    void setUp(CassandraCluster cassandra) throws ConfigurationException {
+    void setUp(CassandraCluster cassandra) {
         cassandraRecipientRewriteTableDAO = new CassandraRecipientRewriteTableDAO(cassandra.getConf(),
CassandraUtils.WITH_DEFAULT_CONFIGURATION);
         cassandraMappingsSourcesDAO = new CassandraMappingsSourcesDAO(cassandra.getConf());
         mappingsSourcesMigration = new MappingsSourcesMigration(cassandraRecipientRewriteTableDAO,
cassandraMappingsSourcesDAO);
@@ -85,7 +84,6 @@ class CassandraMappingsRoutesTest {
             new TasksRoutes(taskManager, jsonTransformer));
 
         webAdminServer.start();
-        webAdminServer.await();
 
         RestAssured.requestSpecification = WebAdminUtils.buildRequestSpecification(webAdminServer)
             .setBasePath(CassandraMappingsRoutes.ROOT_PATH)
diff --git a/server/protocols/webadmin/webadmin-cassandra/src/test/java/org/apache/james/webadmin/routes/CassandraMigrationRoutesTest.java
b/server/protocols/webadmin/webadmin-cassandra/src/test/java/org/apache/james/webadmin/routes/CassandraMigrationRoutesTest.java
index c41794b..6f8c093 100644
--- a/server/protocols/webadmin/webadmin-cassandra/src/test/java/org/apache/james/webadmin/routes/CassandraMigrationRoutesTest.java
+++ b/server/protocols/webadmin/webadmin-cassandra/src/test/java/org/apache/james/webadmin/routes/CassandraMigrationRoutesTest.java
@@ -54,6 +54,7 @@ import org.junit.Ignore;
 import org.junit.Test;
 
 import com.google.common.collect.ImmutableMap;
+
 import io.restassured.RestAssured;
 import io.restassured.http.ContentType;
 import reactor.core.publisher.Mono;
@@ -66,7 +67,7 @@ public class CassandraMigrationRoutesTest {
     private CassandraSchemaVersionDAO schemaVersionDAO;
     private MemoryTaskManager taskManager;
 
-    private void createServer() throws Exception {
+    private void createServer() {
         Migration successfulMigration = mock(Migration.class);
         when(successfulMigration.run()).thenReturn(Migration.Result.COMPLETED);
 
@@ -87,8 +88,6 @@ public class CassandraMigrationRoutesTest {
             new TasksRoutes(taskManager, jsonTransformer));
 
         webAdminServer.start();
-        webAdminServer.await();
-
 
         RestAssured.requestSpecification = WebAdminUtils.buildRequestSpecification(webAdminServer)
             .setBasePath(CassandraMigrationRoutes.VERSION_BASE)
diff --git a/server/protocols/webadmin/webadmin-core/src/main/java/org/apache/james/webadmin/WebAdminServer.java
b/server/protocols/webadmin/webadmin-core/src/main/java/org/apache/james/webadmin/WebAdminServer.java
index 0a2c357..9474e10 100644
--- a/server/protocols/webadmin/webadmin-core/src/main/java/org/apache/james/webadmin/WebAdminServer.java
+++ b/server/protocols/webadmin/webadmin-core/src/main/java/org/apache/james/webadmin/WebAdminServer.java
@@ -172,10 +172,6 @@ public class WebAdminServer implements Startable {
         }
     }
 
-    public void await() {
-        service.awaitInitialization();
-    }
-
     public Port getPort() {
         Preconditions.checkState(port != null, "WebAdminServer should be configured.");
         return port;
diff --git a/server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/routes/ErrorRoutesTest.java
b/server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/routes/ErrorRoutesTest.java
index 0f2979f..d5e8916 100644
--- a/server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/routes/ErrorRoutesTest.java
+++ b/server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/routes/ErrorRoutesTest.java
@@ -52,7 +52,6 @@ public class ErrorRoutesTest {
                 new NoopMetricFactory(),
                 new ErrorRoutes());
         webAdminServer.start();
-        webAdminServer.await();
 
         RestAssured.requestSpecification = WebAdminUtils.buildRequestSpecification(webAdminServer)
                 .setBasePath(ErrorRoutes.BASE_URL)
diff --git a/server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/routes/HealthCheckRoutesTest.java
b/server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/routes/HealthCheckRoutesTest.java
index 2b522e4..17ed35c 100644
--- a/server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/routes/HealthCheckRoutesTest.java
+++ b/server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/routes/HealthCheckRoutesTest.java
@@ -83,7 +83,6 @@ public class HealthCheckRoutesTest {
             new HealthCheckRoutes(healthChecks, new JsonTransformer()));
 
         webAdminServer.start();
-        webAdminServer.await();
 
         RestAssured.requestSpecification = WebAdminUtils.buildRequestSpecification(webAdminServer)
             .setBasePath(HealthCheckRoutes.HEALTHCHECK)
diff --git a/server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/routes/TasksRoutesTest.java
b/server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/routes/TasksRoutesTest.java
index cb9f724..aaaea2c 100644
--- a/server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/routes/TasksRoutesTest.java
+++ b/server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/routes/TasksRoutesTest.java
@@ -60,7 +60,6 @@ class TasksRoutesTest {
             new TasksRoutes(taskManager, new JsonTransformer()));
 
         webAdminServer.start();
-        webAdminServer.await();
 
         RestAssured.requestSpecification = WebAdminUtils.buildRequestSpecification(webAdminServer)
             .setBasePath(TasksRoutes.BASE)
diff --git a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/AliasRoutesTest.java
b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/AliasRoutesTest.java
index 7390e20..e511fb3 100644
--- a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/AliasRoutesTest.java
+++ b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/AliasRoutesTest.java
@@ -81,12 +81,11 @@ class AliasRoutesTest {
 
     private WebAdminServer webAdminServer;
 
-    private void createServer(AliasRoutes aliasRoutes) throws Exception {
+    private void createServer(AliasRoutes aliasRoutes) {
         webAdminServer = WebAdminUtils.createWebAdminServer(
             new DefaultMetricFactory(),
             aliasRoutes);
         webAdminServer.start();
-        webAdminServer.await();
 
         RestAssured.requestSpecification = WebAdminUtils.buildRequestSpecification(webAdminServer)
             .setBasePath("address/aliases")
diff --git a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/DLPConfigurationRoutesTest.java
b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/DLPConfigurationRoutesTest.java
index 6f029a3..2ddb946 100644
--- a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/DLPConfigurationRoutesTest.java
+++ b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/DLPConfigurationRoutesTest.java
@@ -66,12 +66,11 @@ class DLPConfigurationRoutesTest {
     private WebAdminServer webAdminServer;
     private EventSourcingDLPConfigurationStore dlpStore;
 
-    private void createServer(DLPConfigurationStore dlpConfigurationStore, DomainList domainList)
throws Exception {
+    private void createServer(DLPConfigurationStore dlpConfigurationStore, DomainList domainList)
{
         webAdminServer = WebAdminUtils.createWebAdminServer(
             new DefaultMetricFactory(),
             new DLPConfigurationRoutes(dlpConfigurationStore, domainList, new JsonTransformer()));
         webAdminServer.start();
-        webAdminServer.await();
 
         requestSpecification = buildRequestSpecification(webAdminServer);
     }
diff --git a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/DomainMappingsRoutesTest.java
b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/DomainMappingsRoutesTest.java
index a980fc5..ff19744 100644
--- a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/DomainMappingsRoutesTest.java
+++ b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/DomainMappingsRoutesTest.java
@@ -75,12 +75,11 @@ class DomainMappingsRoutesTest {
     private WebAdminServer webAdminServer;
     private DomainList domainList;
 
-    private void createServer(DomainMappingsRoutes domainMappingsRoutes) throws Exception
{
+    private void createServer(DomainMappingsRoutes domainMappingsRoutes) {
         webAdminServer = WebAdminUtils.createWebAdminServer(
             new DefaultMetricFactory(),
             domainMappingsRoutes);
         webAdminServer.start();
-        webAdminServer.await();
 
         RestAssured.requestSpecification = WebAdminUtils.buildRequestSpecification(webAdminServer)
             .setBasePath(DOMAIN_MAPPINGS)
diff --git a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/DomainsRoutesTest.java
b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/DomainsRoutesTest.java
index 95d71cf..dbb2857 100644
--- a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/DomainsRoutesTest.java
+++ b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/DomainsRoutesTest.java
@@ -65,13 +65,12 @@ class DomainsRoutesTest {
 
     private WebAdminServer webAdminServer;
 
-    private void createServer(DomainList domainList) throws Exception {
+    private void createServer(DomainList domainList) {
         DomainAliasService domainAliasService = new DomainAliasService(new MemoryRecipientRewriteTable(),
domainList);
         webAdminServer = WebAdminUtils.createWebAdminServer(
             new DefaultMetricFactory(),
             new DomainsRoutes(domainList, domainAliasService, new JsonTransformer()));
         webAdminServer.start();
-        webAdminServer.await();
 
         RestAssured.requestSpecification = WebAdminUtils.buildRequestSpecification(webAdminServer)
             .setBasePath(DomainsRoutes.DOMAINS)
diff --git a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/ForwardRoutesTest.java
b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/ForwardRoutesTest.java
index 3c6a667..70c2ba5 100644
--- a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/ForwardRoutesTest.java
+++ b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/ForwardRoutesTest.java
@@ -80,12 +80,11 @@ class ForwardRoutesTest {
 
     private WebAdminServer webAdminServer;
 
-    private void createServer(ForwardRoutes forwardRoutes) throws Exception {
+    private void createServer(ForwardRoutes forwardRoutes) {
         webAdminServer = WebAdminUtils.createWebAdminServer(
             new DefaultMetricFactory(),
             forwardRoutes);
         webAdminServer.start();
-        webAdminServer.await();
 
         RestAssured.requestSpecification = WebAdminUtils.buildRequestSpecification(webAdminServer)
             .setBasePath("address/forwards")
diff --git a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/GroupsRoutesTest.java
b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/GroupsRoutesTest.java
index 775930b..8c99c13 100644
--- a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/GroupsRoutesTest.java
+++ b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/GroupsRoutesTest.java
@@ -78,12 +78,11 @@ class GroupsRoutesTest {
 
     private WebAdminServer webAdminServer;
 
-    private void createServer(GroupsRoutes groupsRoutes) throws Exception {
+    private void createServer(GroupsRoutes groupsRoutes) {
         webAdminServer = WebAdminUtils.createWebAdminServer(
             new DefaultMetricFactory(),
             groupsRoutes);
         webAdminServer.start();
-        webAdminServer.await();
 
         RestAssured.requestSpecification = WebAdminUtils.buildRequestSpecification(webAdminServer)
             .setBasePath("address/groups")
diff --git a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/SieveQuotaRoutesTest.java
b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/SieveQuotaRoutesTest.java
index 6d8df14..53fe916 100644
--- a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/SieveQuotaRoutesTest.java
+++ b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/SieveQuotaRoutesTest.java
@@ -38,7 +38,7 @@ import org.junit.jupiter.api.Test;
 import io.restassured.RestAssured;
 import io.restassured.http.ContentType;
 
-public class SieveQuotaRoutesTest {
+class SieveQuotaRoutesTest {
 
     private static final User USER_A = User.fromUsername("userA");
 
@@ -46,13 +46,12 @@ public class SieveQuotaRoutesTest {
     private SieveQuotaRepository sieveRepository;
 
     @BeforeEach
-    void setUp() throws Exception {
+    void setUp() {
         sieveRepository = new InMemorySieveQuotaRepository();
         webAdminServer = WebAdminUtils.createWebAdminServer(
                 new DefaultMetricFactory(),
                 new SieveQuotaRoutes(sieveRepository, new JsonTransformer()));
         webAdminServer.start();
-        webAdminServer.await();
 
         RestAssured.requestSpecification = WebAdminUtils.buildRequestSpecification(webAdminServer)
             .build();
diff --git a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/SieveScriptRoutesTest.java
b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/SieveScriptRoutesTest.java
index de59250..3658666 100644
--- a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/SieveScriptRoutesTest.java
+++ b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/SieveScriptRoutesTest.java
@@ -96,7 +96,6 @@ public class SieveScriptRoutesTest {
             new DefaultMetricFactory(),
             new SieveScriptRoutes(sieveRepository, usersRepository));
         webAdminServer.start();
-        webAdminServer.await();
 
         RestAssured.requestSpecification = WebAdminUtils
             .buildRequestSpecification(webAdminServer)
diff --git a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/UsersRoutesTest.java
b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/UsersRoutesTest.java
index a18920d..dbe92e9 100644
--- a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/UsersRoutesTest.java
+++ b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/UsersRoutesTest.java
@@ -59,12 +59,11 @@ class UsersRoutesTest {
     private static final String USERNAME = "username@" + DOMAIN.name();
     private WebAdminServer webAdminServer;
 
-    private void createServer(UsersRepository usersRepository) throws Exception {
+    private void createServer(UsersRepository usersRepository) {
         webAdminServer = WebAdminUtils.createWebAdminServer(
             new DefaultMetricFactory(),
             new UserRoutes(new UserService(usersRepository), new JsonTransformer()));
         webAdminServer.start();
-        webAdminServer.await();
 
         RestAssured.requestSpecification = WebAdminUtils.buildRequestSpecification(webAdminServer)
             .setBasePath(UserRoutes.USERS)
diff --git a/server/protocols/webadmin/webadmin-mailbox-deleted-message-vault/src/test/java/org/apache/james/webadmin/vault/routes/DeletedMessagesVaultRoutesTest.java
b/server/protocols/webadmin/webadmin-mailbox-deleted-message-vault/src/test/java/org/apache/james/webadmin/vault/routes/DeletedMessagesVaultRoutesTest.java
index d362c18..b471d34 100644
--- a/server/protocols/webadmin/webadmin-mailbox-deleted-message-vault/src/test/java/org/apache/james/webadmin/vault/routes/DeletedMessagesVaultRoutesTest.java
+++ b/server/protocols/webadmin/webadmin-mailbox-deleted-message-vault/src/test/java/org/apache/james/webadmin/vault/routes/DeletedMessagesVaultRoutesTest.java
@@ -188,7 +188,6 @@ class DeletedMessagesVaultRoutesTest {
             new DeletedMessagesVaultRoutes(vault, vaultRestore, exportService, jsonTransformer,
taskManager, queryTranslator, usersRepository, messageIdFactory));
 
         webAdminServer.start();
-        webAdminServer.await();
         RestAssured.requestSpecification = WebAdminUtils.buildRequestSpecification(webAdminServer)
             .setBasePath(DeletedMessagesVaultRoutes.ROOT_PATH)
             .log(LogDetail.METHOD)
diff --git a/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/DomainQuotaRoutesNoVirtualHostingTest.java
b/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/DomainQuotaRoutesNoVirtualHostingTest.java
index 0fa665e..576c8fc 100644
--- a/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/DomainQuotaRoutesNoVirtualHostingTest.java
+++ b/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/DomainQuotaRoutesNoVirtualHostingTest.java
@@ -39,6 +39,7 @@ import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ValueSource;
 
 import com.google.common.collect.ImmutableSet;
+
 import io.restassured.RestAssured;
 
 class DomainQuotaRoutesNoVirtualHostingTest {
@@ -63,7 +64,6 @@ class DomainQuotaRoutesNoVirtualHostingTest {
             new NoopMetricFactory(),
             domainQuotaRoutes);
         webAdminServer.start();
-        webAdminServer.await();
 
         RestAssured.requestSpecification = WebAdminUtils.buildRequestSpecification(webAdminServer)
             .build();
diff --git a/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/EventDeadLettersRoutesTest.java
b/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/EventDeadLettersRoutesTest.java
index 9ab4215..0ed07fd 100644
--- a/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/EventDeadLettersRoutesTest.java
+++ b/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/EventDeadLettersRoutesTest.java
@@ -113,7 +113,7 @@ class EventDeadLettersRoutesTest {
     private MemoryTaskManager taskManager;
 
     @BeforeEach
-    void beforeEach() throws Exception {
+    void beforeEach() {
         deadLetters = new MemoryEventDeadLetters();
         JsonTransformer jsonTransformer = new JsonTransformer();
         EventSerializer eventSerializer = new EventSerializer(new InMemoryId.Factory(), new
InMemoryMessageId.Factory());
@@ -127,7 +127,6 @@ class EventDeadLettersRoutesTest {
             new EventDeadLettersRoutes(service, eventSerializer, taskManager, jsonTransformer),
             new TasksRoutes(taskManager, jsonTransformer));
         webAdminServer.start();
-        webAdminServer.await();
 
         RestAssured.requestSpecification = WebAdminUtils.buildRequestSpecification(webAdminServer).build();
         RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
diff --git a/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/ReindexingRoutesTest.java
b/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/ReindexingRoutesTest.java
index b07f35b..95faeaf 100644
--- a/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/ReindexingRoutesTest.java
+++ b/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/ReindexingRoutesTest.java
@@ -78,7 +78,7 @@ class ReindexingRoutesTest {
     private InMemoryMailboxManager mailboxManager;
 
     @BeforeEach
-    void beforeEach() throws Exception {
+    void beforeEach() {
         mailboxManager = InMemoryIntegrationResources.defaultResources().getMailboxManager();
         MemoryTaskManager taskManager = new MemoryTaskManager();
         InMemoryId.Factory mailboxIdFactory = new InMemoryId.Factory();
@@ -106,7 +106,6 @@ class ReindexingRoutesTest {
                 new MessageIdReIndexerImpl(mailboxManager, mailboxManager.getMapperFactory(),
searchIndex),
                 jsonTransformer));
         webAdminServer.start();
-        webAdminServer.await();
 
         RestAssured.requestSpecification = WebAdminUtils.buildRequestSpecification(webAdminServer).build();
         RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
diff --git a/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/UserMailboxesRoutesTest.java
b/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/UserMailboxesRoutesTest.java
index 85c3b9e..27190b5 100644
--- a/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/UserMailboxesRoutesTest.java
+++ b/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/UserMailboxesRoutesTest.java
@@ -77,7 +77,6 @@ class UserMailboxesRoutesTest {
             new DefaultMetricFactory(),
             new UserMailboxesRoutes(new UserMailboxesService(mailboxManager, usersRepository),
new JsonTransformer()));
         webAdminServer.start();
-        webAdminServer.await();
 
         RestAssured.requestSpecification = WebAdminUtils.buildRequestSpecification(webAdminServer)
             .setBasePath(USERS_BASE + SEPARATOR + USERNAME + SEPARATOR + UserMailboxesRoutes.MAILBOXES)
diff --git a/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/WebAdminQuotaSearchTestSystem.java
b/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/WebAdminQuotaSearchTestSystem.java
index b145aa1..cee2514 100644
--- a/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/WebAdminQuotaSearchTestSystem.java
+++ b/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/WebAdminQuotaSearchTestSystem.java
@@ -67,7 +67,6 @@ public class WebAdminQuotaSearchTestSystem {
             domainQuotaRoutes,
             globalQuotaRoutes);
         this.webAdminServer.start();
-        this.webAdminServer.await();
 
         this.requestSpecBuilder = WebAdminUtils.buildRequestSpecification(webAdminServer)
             .build();
diff --git a/server/protocols/webadmin/webadmin-mailqueue/src/test/java/org/apache/james/webadmin/routes/MailQueueRoutesTest.java
b/server/protocols/webadmin/webadmin-mailqueue/src/test/java/org/apache/james/webadmin/routes/MailQueueRoutesTest.java
index a1f7c58..26004bb 100644
--- a/server/protocols/webadmin/webadmin-mailqueue/src/test/java/org/apache/james/webadmin/routes/MailQueueRoutesTest.java
+++ b/server/protocols/webadmin/webadmin-mailqueue/src/test/java/org/apache/james/webadmin/routes/MailQueueRoutesTest.java
@@ -85,7 +85,7 @@ public class MailQueueRoutesTest {
     MemoryMailQueueFactory mailQueueFactory;
 
 
-    WebAdminServer createServer(MemoryMailQueueFactory mailQueueFactory) throws Exception
{
+    WebAdminServer createServer(MemoryMailQueueFactory mailQueueFactory) {
         TaskManager taskManager = new MemoryTaskManager();
         JsonTransformer jsonTransformer = new JsonTransformer();
 
@@ -94,7 +94,6 @@ public class MailQueueRoutesTest {
             new MailQueueRoutes(mailQueueFactory, jsonTransformer, taskManager),
             new TasksRoutes(taskManager, jsonTransformer));
         server.start();
-        server.await();
         return server;
     }
 
diff --git a/server/protocols/webadmin/webadmin-mailrepository/src/test/java/org/apache/james/webadmin/routes/MailRepositoriesRoutesTest.java
b/server/protocols/webadmin/webadmin-mailrepository/src/test/java/org/apache/james/webadmin/routes/MailRepositoriesRoutesTest.java
index 3fa38c4..2d9f935 100644
--- a/server/protocols/webadmin/webadmin-mailrepository/src/test/java/org/apache/james/webadmin/routes/MailRepositoriesRoutesTest.java
+++ b/server/protocols/webadmin/webadmin-mailrepository/src/test/java/org/apache/james/webadmin/routes/MailRepositoriesRoutesTest.java
@@ -128,7 +128,6 @@ public class MailRepositoriesRoutesTest {
                     jsonTransformer, reprocessingService, taskManager),
             new TasksRoutes(taskManager, jsonTransformer));
         webAdminServer.start();
-        webAdminServer.await();
 
         RestAssured.requestSpecification = WebAdminUtils.buildRequestSpecification(webAdminServer)
             .setBasePath(MailRepositoriesRoutes.MAIL_REPOSITORIES)


---------------------------------------------------------------------
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