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 2019/05/22 03:37:07 UTC

[james-project] 03/03: JAMES-2775 Linshare should be stopped in integration 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 7d7e1771b71b26ceab5e7a276ae269f0960f6e87
Author: Tran Tien Duc <dt...@linagora.com>
AuthorDate: Mon May 20 17:16:30 2019 +0700

    JAMES-2775 Linshare should be stopped in integration tests
    
    Because there is only one test class in integration tests module need this docker. When it finishes, we can stop docker linshare to save some resources
---
 .../test/java/org/apache/james/modules/LinshareGuiceExtension.java  | 6 ++++++
 .../CassandraLinshareBlobExportMechanismIntegrationTest.java        | 2 +-
 .../memory/MemoryLinshareBlobExportMechanismIntegrationTest.java    | 2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/server/container/guice/blob-export-guice/src/test/java/org/apache/james/modules/LinshareGuiceExtension.java b/server/container/guice/blob-export-guice/src/test/java/org/apache/james/modules/LinshareGuiceExtension.java
index 090395f..9ed556c 100644
--- a/server/container/guice/blob-export-guice/src/test/java/org/apache/james/modules/LinshareGuiceExtension.java
+++ b/server/container/guice/blob-export-guice/src/test/java/org/apache/james/modules/LinshareGuiceExtension.java
@@ -41,6 +41,12 @@ public class LinshareGuiceExtension implements GuiceModuleTestExtension {
     }
 
     @Override
+    public void afterAll(ExtensionContext extensionContext) throws Exception {
+        linshareExtension.getLinshare()
+            .stop();
+    }
+
+    @Override
     public Module getModule() {
         return Modules.combine(
             binder -> binder.bind(BlobExportImplChoice.class)
diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraLinshareBlobExportMechanismIntegrationTest.java b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraLinshareBlobExportMechanismIntegrationTest.java
index 6f5576f..9d8fb46 100644
--- a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraLinshareBlobExportMechanismIntegrationTest.java
+++ b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraLinshareBlobExportMechanismIntegrationTest.java
@@ -41,7 +41,7 @@ public class CassandraLinshareBlobExportMechanismIntegrationTest extends Linshar
 
     private static final long LIMIT_TO_10_MESSAGES = 10;
 
-    private final LinshareGuiceExtension linshareGuiceExtension = new LinshareGuiceExtension();
+    private static final LinshareGuiceExtension linshareGuiceExtension = new LinshareGuiceExtension();
 
     @RegisterExtension
     JamesServerExtension testExtension = new JamesServerBuilder()
diff --git a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryLinshareBlobExportMechanismIntegrationTest.java b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryLinshareBlobExportMechanismIntegrationTest.java
index 97aa5bc..9c64f07 100644
--- a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryLinshareBlobExportMechanismIntegrationTest.java
+++ b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryLinshareBlobExportMechanismIntegrationTest.java
@@ -38,7 +38,7 @@ class MemoryLinshareBlobExportMechanismIntegrationTest extends LinshareBlobExpor
 
     private static final int LIMIT_TO_10_MESSAGES = 10;
 
-    private final LinshareGuiceExtension linshareGuiceExtension = new LinshareGuiceExtension();
+    private static final LinshareGuiceExtension linshareGuiceExtension = new LinshareGuiceExtension();
 
     @RegisterExtension
     JamesServerExtension jamesServerExtension = new JamesServerBuilder()


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