You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by hq...@apache.org on 2025/09/19 09:34:16 UTC

(james-project) branch master updated (bbed3f7e47 -> 1b8f11835f)

This is an automated email from the ASF dual-hosted git repository.

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


    from bbed3f7e47 [BUILD TIME] james-server-webadmin-mailbox: use lucene instead of OpenSearch
     new ad2e4edadc [BUILD] [james-server-distributed-app] Compact tests for scanning search
     new c04c2fa4a0 [BUILD] [james-server-distributed-app] Compact WithS3SSECTest: not run JmapJamesServerContract
     new 5ab8c193e6 [BUILD] [james-server-distributed-app] Compact WithoutMailQueueViewTest
     new f2c041cb28 [BUILD] [james-server-distributed-app] Compact encrypted blob store test suite
     new 872d7aedc4 [BUILD] [james-server-distributed-app] Compact AWS S3 test suite
     new a68813ce39 [BUILD] [james-server-distributed-app] Compact Cassandra + passThrough mode blob store tests
     new bde20f4938 [BUILD] [james-server-distributed-app] Compact Cassandra + deduplication mode blob store tests
     new 7993b9d106 [BUILD] [james-server-distributed-app] Compact blob store caching tests
     new 6d918dab31 [BUILD] [james-server-distributed-app] Remove unused CassandraRabbitMQAwsS3JmapTestRule
     new 4df0096058 [BUILD] [james-server-postgres-app] Compact scanning search tests for Postgres app
     new 52a0fdb9a7 [BUILD] [james-server-cassandra-app] Remove CassandraLegacyQuotaJamesServerTest
     new 5f1f537512 [BUILD] [james-server-cassandra-app] Smoke tests for Cassandra app
     new 7b2fec42a4 [BUILD] [blob-postgres] PostgresBlobStoreDAOTest: reduce level of concurrency tests
     new 72e20f18fe [BUILD] MailsShouldBeWellReceived: oneHundredMailsShouldBeWellReceived should reduce concurrency
     new 1b8f11835f [BUILD] [james-server-cli-integration-tests] Better JVM isolation

The 15 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 server/apps/cassandra-app/pom.xml                  |  10 ++
 .../org/apache/james/CassandraJamesServerTest.java |   3 +
 .../apache/james/CassandraLdapJamesServerTest.java |   3 +
 .../james/CassandraLegacyQuotaJamesServerTest.java |  41 ---------
 .../apache/james/WithCassandraBlobStoreTest.java   |   3 +
 server/apps/cli-integration-tests/pom.xml          |  12 +++
 .../org/apache/james/CassandraCacheQueryTest.java  |   2 +-
 .../james/CassandraRabbitMQAwsS3JmapTestRule.java  | 101 ---------------------
 .../org/apache/james/WithCacheMutableTest.java     |  29 ------
 ...hCacheImmutableTest.java => WithCacheTest.java} |  22 ++---
 ...ssandraDeduplicationBlobStoreImmutableTest.java |  47 ----------
 ...> WithCassandraDeduplicationBlobStoreTest.java} |   2 +-
 ...CassandraPassThroughBlobStoreImmutableTest.java |  47 ----------
 ... => WithCassandraPassThroughBlobStoreTest.java} |   2 +-
 .../james/WithDefaultAwsS3ImmutableTest.java       |  32 -------
 ...3MutableTest.java => WithDefaultAwsS3Test.java} |   2 +-
 .../james/WithEncryptedBlobStoreImmutableTest.java |  54 -----------
 ...leTest.java => WithEncryptedBlobStoreTest.java} |   2 +-
 .../test/java/org/apache/james/WithS3SSECTest.java |   3 +-
 .../james/WithScanningSearchMutableTest.java       |  29 ------
 ...utableTest.java => WithScanningSearchTest.java} |  11 ++-
 ...ableTest.java => WithoutMailQueueViewTest.java} |  11 ++-
 ...st.java => PostgresWithScanningSearchTest.java} |   9 +-
 .../james/WithScanningSearchMutableTest.java       |  56 ------------
 .../blob/postgres/PostgresBlobStoreDAOTest.java    |  23 ++++-
 .../apache/james/MailsShouldBeWellReceived.java    |   4 +-
 26 files changed, 94 insertions(+), 466 deletions(-)
 delete mode 100644 server/apps/cassandra-app/src/test/java/org/apache/james/CassandraLegacyQuotaJamesServerTest.java
 delete mode 100644 server/apps/distributed-app/src/test/java/org/apache/james/CassandraRabbitMQAwsS3JmapTestRule.java
 delete mode 100644 server/apps/distributed-app/src/test/java/org/apache/james/WithCacheMutableTest.java
 rename server/apps/distributed-app/src/test/java/org/apache/james/{WithCacheImmutableTest.java => WithCacheTest.java} (87%)
 delete mode 100644 server/apps/distributed-app/src/test/java/org/apache/james/WithCassandraDeduplicationBlobStoreImmutableTest.java
 rename server/apps/distributed-app/src/test/java/org/apache/james/{WithCassandraDeduplicationBlobStoreMutableTest.java => WithCassandraDeduplicationBlobStoreTest.java} (97%)
 delete mode 100644 server/apps/distributed-app/src/test/java/org/apache/james/WithCassandraPassThroughBlobStoreImmutableTest.java
 rename server/apps/distributed-app/src/test/java/org/apache/james/{WithCassandraPassThroughBlobStoreMutableTest.java => WithCassandraPassThroughBlobStoreTest.java} (97%)
 delete mode 100644 server/apps/distributed-app/src/test/java/org/apache/james/WithDefaultAwsS3ImmutableTest.java
 rename server/apps/distributed-app/src/test/java/org/apache/james/{WithDefaultAwsS3MutableTest.java => WithDefaultAwsS3Test.java} (92%)
 delete mode 100644 server/apps/distributed-app/src/test/java/org/apache/james/WithEncryptedBlobStoreImmutableTest.java
 rename server/apps/distributed-app/src/test/java/org/apache/james/{WithEncryptedBlobStoreMutableTest.java => WithEncryptedBlobStoreTest.java} (96%)
 delete mode 100644 server/apps/distributed-app/src/test/java/org/apache/james/WithScanningSearchMutableTest.java
 rename server/apps/distributed-app/src/test/java/org/apache/james/{WithScanningSearchImmutableTest.java => WithScanningSearchTest.java} (90%)
 rename server/apps/distributed-app/src/test/java/org/apache/james/{WithoutMailQueueViewImmutableTest.java => WithoutMailQueueViewTest.java} (91%)
 rename server/apps/postgres-app/src/test/java/org/apache/james/{WithScanningSearchImmutableTest.java => PostgresWithScanningSearchTest.java} (89%)
 delete mode 100644 server/apps/postgres-app/src/test/java/org/apache/james/WithScanningSearchMutableTest.java


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


(james-project) 11/15: [BUILD] [james-server-cassandra-app] Remove CassandraLegacyQuotaJamesServerTest

Posted by hq...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 52a0fdb9a7ed9d914de2353247ab6d321713421c
Author: Quan Tran <hq...@linagora.com>
AuthorDate: Thu Sep 18 12:05:50 2025 +0700

    [BUILD] [james-server-cassandra-app] Remove CassandraLegacyQuotaJamesServerTest
---
 .../james/CassandraLegacyQuotaJamesServerTest.java | 41 ----------------------
 1 file changed, 41 deletions(-)

diff --git a/server/apps/cassandra-app/src/test/java/org/apache/james/CassandraLegacyQuotaJamesServerTest.java b/server/apps/cassandra-app/src/test/java/org/apache/james/CassandraLegacyQuotaJamesServerTest.java
deleted file mode 100644
index 5c593e2747..0000000000
--- a/server/apps/cassandra-app/src/test/java/org/apache/james/CassandraLegacyQuotaJamesServerTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james;
-
-import org.apache.james.jmap.JmapJamesServerContract;
-import org.apache.james.modules.TestJMAPServerModule;
-import org.junit.jupiter.api.extension.RegisterExtension;
-
-public class CassandraLegacyQuotaJamesServerTest implements JamesServerConcreteContract, JmapJamesServerContract {
-    @RegisterExtension
-    static JamesServerExtension testExtension = new JamesServerBuilder<CassandraJamesServerConfiguration>(tmpDir ->
-        CassandraJamesServerConfiguration.builder()
-            .workingDirectory(tmpDir)
-            .configurationFromClasspath()
-            .searchConfiguration(SearchConfiguration.openSearch())
-            .quotaCompatibilityModeEnabled(true)
-            .build())
-        .extension(new DockerOpenSearchExtension())
-        .extension(new CassandraExtension())
-        .server(configuration -> CassandraJamesServerMain.createServer(configuration)
-            .overrideWith(new TestJMAPServerModule()))
-        .lifeCycle(JamesServerExtension.Lifecycle.PER_CLASS)
-        .build();
-}


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


(james-project) 04/15: [BUILD] [james-server-distributed-app] Compact encrypted blob store test suite

Posted by hq...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f2c041cb288de642ed3a94eb6ac9631f24b9087b
Author: Quan Tran <hq...@linagora.com>
AuthorDate: Thu Sep 18 11:40:50 2025 +0700

    [BUILD] [james-server-distributed-app] Compact encrypted blob store test suite
---
 .../james/WithEncryptedBlobStoreImmutableTest.java | 54 ----------------------
 ...leTest.java => WithEncryptedBlobStoreTest.java} |  2 +-
 2 files changed, 1 insertion(+), 55 deletions(-)

diff --git a/server/apps/distributed-app/src/test/java/org/apache/james/WithEncryptedBlobStoreImmutableTest.java b/server/apps/distributed-app/src/test/java/org/apache/james/WithEncryptedBlobStoreImmutableTest.java
deleted file mode 100644
index a8263b735f..0000000000
--- a/server/apps/distributed-app/src/test/java/org/apache/james/WithEncryptedBlobStoreImmutableTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james;
-
-import org.apache.james.blob.aes.CryptoConfig;
-import org.apache.james.jmap.JmapJamesServerContract;
-import org.apache.james.modules.AwsS3BlobStoreExtension;
-import org.apache.james.modules.RabbitMQExtension;
-import org.apache.james.modules.TestJMAPServerModule;
-import org.apache.james.modules.blobstore.BlobStoreConfiguration;
-import org.junit.jupiter.api.extension.RegisterExtension;
-
-public class WithEncryptedBlobStoreImmutableTest implements JmapJamesServerContract, JamesServerConcreteContract {
-    @RegisterExtension
-    static JamesServerExtension jamesServerExtension = new JamesServerBuilder<CassandraRabbitMQJamesConfiguration>(tmpDir ->
-        CassandraRabbitMQJamesConfiguration.builder()
-            .workingDirectory(tmpDir)
-            .configurationFromClasspath()
-            .blobStore(BlobStoreConfiguration.s3()
-                .enableCache()
-                .deduplication()
-                .cryptoConfig(CryptoConfig.builder()
-                    .password("myPass".toCharArray())
-                    // Hex.encode("salty".getBytes(StandardCharsets.UTF_8))
-                    .salt("73616c7479")
-                    .build()))
-            .searchConfiguration(SearchConfiguration.openSearch())
-            .build())
-        .server(configuration -> CassandraRabbitMQJamesServerMain.createServer(configuration)
-            .overrideWith(new TestJMAPServerModule()))
-        .extension(new DockerOpenSearchExtension())
-        .extension(new CassandraExtension())
-        .extension(new RabbitMQExtension())
-        .extension(new AwsS3BlobStoreExtension())
-        .lifeCycle(JamesServerExtension.Lifecycle.PER_CLASS)
-        .build();
-}
diff --git a/server/apps/distributed-app/src/test/java/org/apache/james/WithEncryptedBlobStoreMutableTest.java b/server/apps/distributed-app/src/test/java/org/apache/james/WithEncryptedBlobStoreTest.java
similarity index 96%
rename from server/apps/distributed-app/src/test/java/org/apache/james/WithEncryptedBlobStoreMutableTest.java
rename to server/apps/distributed-app/src/test/java/org/apache/james/WithEncryptedBlobStoreTest.java
index 39de49677d..aa82e0cbef 100644
--- a/server/apps/distributed-app/src/test/java/org/apache/james/WithEncryptedBlobStoreMutableTest.java
+++ b/server/apps/distributed-app/src/test/java/org/apache/james/WithEncryptedBlobStoreTest.java
@@ -26,7 +26,7 @@ import org.apache.james.modules.TestJMAPServerModule;
 import org.apache.james.modules.blobstore.BlobStoreConfiguration;
 import org.junit.jupiter.api.extension.RegisterExtension;
 
-public class WithEncryptedBlobStoreMutableTest implements MailsShouldBeWellReceivedConcreteContract {
+public class WithEncryptedBlobStoreTest implements MailsShouldBeWellReceivedConcreteContract {
     @RegisterExtension
     static JamesServerExtension jamesServerExtension = new JamesServerBuilder<CassandraRabbitMQJamesConfiguration>(tmpDir ->
         CassandraRabbitMQJamesConfiguration.builder()


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


(james-project) 13/15: [BUILD] [blob-postgres] PostgresBlobStoreDAOTest: reduce level of concurrency tests

Posted by hq...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 7b2fec42a4ac205f2daa1286242bff5336c55033
Author: Quan Tran <hq...@linagora.com>
AuthorDate: Thu Sep 18 13:41:23 2025 +0700

    [BUILD] [blob-postgres] PostgresBlobStoreDAOTest: reduce level of concurrency tests
    
    Postgres backed blob store is notably slow in the concurrency manner. We can reduce the concurrency level by half to save build time, while still can validate PostgresBlobStoreDAO handling concurrency well.
---
 .../blob/postgres/PostgresBlobStoreDAOTest.java    | 23 ++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/server/blob/blob-postgres/src/test/java/org/apache/james/blob/postgres/PostgresBlobStoreDAOTest.java b/server/blob/blob-postgres/src/test/java/org/apache/james/blob/postgres/PostgresBlobStoreDAOTest.java
index 33c53c5a99..7399cfcfa3 100644
--- a/server/blob/blob-postgres/src/test/java/org/apache/james/blob/postgres/PostgresBlobStoreDAOTest.java
+++ b/server/blob/blob-postgres/src/test/java/org/apache/james/blob/postgres/PostgresBlobStoreDAOTest.java
@@ -74,8 +74,8 @@ class PostgresBlobStoreDAOTest implements BlobStoreDAOContract {
                 (threadNumber, step) -> testee().save(TEST_BUCKET_NAME, TEST_BLOB_ID, ByteSource.wrap(bytes)),
                 (threadNumber, step) -> checkConcurrentSaveOperation(bytes)
             )
-            .threadCount(10)
-            .operationCount(20)
+            .threadCount(5)
+            .operationCount(10)
             .runSuccessfullyWithin(CONCURRENT_TEST_DURATION);
     }
 
@@ -89,8 +89,23 @@ class PostgresBlobStoreDAOTest implements BlobStoreDAOContract {
                 (threadNumber, step) -> testee().save(TEST_BUCKET_NAME, TEST_BLOB_ID, new ByteArrayInputStream(bytes)),
                 (threadNumber, step) -> checkConcurrentSaveOperation(bytes)
             )
-            .threadCount(10)
-            .operationCount(20)
+            .threadCount(5)
+            .operationCount(10)
             .runSuccessfullyWithin(CONCURRENT_TEST_DURATION);
     }
+
+    @Override
+    @ParameterizedTest(name = "[{index}] {0}")
+    @MethodSource(value = "blobs")
+    public void concurrentSaveBytesShouldReturnConsistentValues(String description, byte[] bytes) throws ExecutionException, InterruptedException {
+        Mono.from(testee().save(TEST_BUCKET_NAME, TEST_BLOB_ID, bytes)).block();
+        ConcurrentTestRunner.builder()
+            .randomlyDistributedReactorOperations(
+                (threadNumber, step) -> testee().save(TEST_BUCKET_NAME, TEST_BLOB_ID, bytes),
+                (threadNumber, step) -> checkConcurrentSaveOperation(bytes)
+            )
+            .threadCount(5)
+            .operationCount(10)
+            .runSuccessfullyWithin(Duration.ofMinutes(10));
+    }
 }
\ No newline at end of file


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


(james-project) 14/15: [BUILD] MailsShouldBeWellReceived: oneHundredMailsShouldBeWellReceived should reduce concurrency

Posted by hq...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 72e20f18fed55b12d564699642613451f4671377
Author: Quan Tran <hq...@linagora.com>
AuthorDate: Thu Sep 18 16:23:50 2025 +0700

    [BUILD] MailsShouldBeWellReceived: oneHundredMailsShouldBeWellReceived should reduce concurrency
    
    oneHundredMailsShouldBeWellReceived tests took minutes to complete.
    cf https://develocity.apache.org/s/sugjiob3gwhpu/tests/slowest-tests
    100 mails -> 50 mails should be good enough.
---
 .../src/test/java/org/apache/james/MailsShouldBeWellReceived.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/container/guice/common/src/test/java/org/apache/james/MailsShouldBeWellReceived.java b/server/container/guice/common/src/test/java/org/apache/james/MailsShouldBeWellReceived.java
index 8a561e8a18..c3d550ee03 100644
--- a/server/container/guice/common/src/test/java/org/apache/james/MailsShouldBeWellReceived.java
+++ b/server/container/guice/common/src/test/java/org/apache/james/MailsShouldBeWellReceived.java
@@ -231,7 +231,7 @@ public interface MailsShouldBeWellReceived {
     }
 
     @Test
-    default void oneHundredMailsShouldBeWellReceived(GuiceJamesServer server) throws Exception {
+    default void concurrentMailsShouldBeWellReceived(GuiceJamesServer server) throws Exception {
         server.getProbe(DataProbeImpl.class).fluent()
             .addDomain(DOMAIN)
             .addUser(JAMES_USER, PASSWORD)
@@ -240,7 +240,7 @@ public interface MailsShouldBeWellReceived {
         MailboxProbeImpl mailboxProbe = server.getProbe(MailboxProbeImpl.class);
         mailboxProbe.createMailbox("#private", JAMES_USER, DefaultMailboxes.INBOX);
 
-        int messageCount = 100;
+        int messageCount = 50;
 
         Port smtpPort = Port.of(smtpPort(server));
         String message = Resources.toString(Resources.getResource("eml/htmlMail.eml"), StandardCharsets.UTF_8);


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


(james-project) 02/15: [BUILD] [james-server-distributed-app] Compact WithS3SSECTest: not run JmapJamesServerContract

Posted by hq...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit c04c2fa4a04ac65cadf2a716d9db641eb32cf769
Author: Quan Tran <hq...@linagora.com>
AuthorDate: Thu Sep 18 11:18:09 2025 +0700

    [BUILD] [james-server-distributed-app] Compact WithS3SSECTest: not run JmapJamesServerContract
    
    Blob store implementation has nothing to do that needs testing JMAP protocol.
---
 .../distributed-app/src/test/java/org/apache/james/WithS3SSECTest.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/server/apps/distributed-app/src/test/java/org/apache/james/WithS3SSECTest.java b/server/apps/distributed-app/src/test/java/org/apache/james/WithS3SSECTest.java
index 09fecb3b2e..4cbf8c1f52 100644
--- a/server/apps/distributed-app/src/test/java/org/apache/james/WithS3SSECTest.java
+++ b/server/apps/distributed-app/src/test/java/org/apache/james/WithS3SSECTest.java
@@ -20,11 +20,10 @@
 package org.apache.james;
 
 import org.apache.james.blob.objectstorage.aws.sse.S3SSECConfiguration;
-import org.apache.james.jmap.JmapJamesServerContract;
 import org.apache.james.modules.S3SSECBlobStoreExtension;
 import org.junit.jupiter.api.extension.RegisterExtension;
 
-public class WithS3SSECTest implements JmapJamesServerContract, MailsShouldBeWellReceivedConcreteContract {
+public class WithS3SSECTest implements MailsShouldBeWellReceivedConcreteContract {
     static S3SSECConfiguration s3SSECConfiguration = new S3SSECConfiguration.Basic("AES256", "masterPassword", "salt");
 
     @RegisterExtension


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


(james-project) 01/15: [BUILD] [james-server-distributed-app] Compact tests for scanning search

Posted by hq...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit ad2e4edadcdb39d5db417e16fe96718c110c252e
Author: Quan Tran <hq...@linagora.com>
AuthorDate: Wed Sep 17 11:38:15 2025 +0700

    [BUILD] [james-server-distributed-app] Compact tests for scanning search
    
    Distributed app + scanning search can start is a good enough test.
---
 .../james/WithScanningSearchMutableTest.java       | 29 ----------------------
 ...utableTest.java => WithScanningSearchTest.java} | 11 ++++++--
 2 files changed, 9 insertions(+), 31 deletions(-)

diff --git a/server/apps/distributed-app/src/test/java/org/apache/james/WithScanningSearchMutableTest.java b/server/apps/distributed-app/src/test/java/org/apache/james/WithScanningSearchMutableTest.java
deleted file mode 100644
index 73260c024c..0000000000
--- a/server/apps/distributed-app/src/test/java/org/apache/james/WithScanningSearchMutableTest.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james;
-
-import org.junit.jupiter.api.extension.RegisterExtension;
-
-class WithScanningSearchMutableTest implements MailsShouldBeWellReceivedConcreteContract {
-    @RegisterExtension
-    JamesServerExtension jamesServerExtension = WithScanningSearchImmutableTest.baseExtension()
-        .lifeCycle(JamesServerExtension.Lifecycle.PER_TEST)
-        .build();
-}
\ No newline at end of file
diff --git a/server/apps/distributed-app/src/test/java/org/apache/james/WithScanningSearchImmutableTest.java b/server/apps/distributed-app/src/test/java/org/apache/james/WithScanningSearchTest.java
similarity index 90%
rename from server/apps/distributed-app/src/test/java/org/apache/james/WithScanningSearchImmutableTest.java
rename to server/apps/distributed-app/src/test/java/org/apache/james/WithScanningSearchTest.java
index 9b5b055650..6b8e2c5f75 100644
--- a/server/apps/distributed-app/src/test/java/org/apache/james/WithScanningSearchImmutableTest.java
+++ b/server/apps/distributed-app/src/test/java/org/apache/james/WithScanningSearchTest.java
@@ -19,14 +19,16 @@
 
 package org.apache.james;
 
-import org.apache.james.jmap.JmapJamesServerContract;
+import static org.assertj.core.api.Assertions.assertThat;
+
 import org.apache.james.modules.AwsS3BlobStoreExtension;
 import org.apache.james.modules.RabbitMQExtension;
 import org.apache.james.modules.TestJMAPServerModule;
 import org.apache.james.modules.blobstore.BlobStoreConfiguration;
+import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 
-class WithScanningSearchImmutableTest implements JmapJamesServerContract, JamesServerConcreteContract {
+class WithScanningSearchTest {
     static JamesServerBuilder<CassandraRabbitMQJamesConfiguration> baseExtension() {
         return new JamesServerBuilder<CassandraRabbitMQJamesConfiguration>(tmpDir ->
             CassandraRabbitMQJamesConfiguration.builder()
@@ -50,4 +52,9 @@ class WithScanningSearchImmutableTest implements JmapJamesServerContract, JamesS
     static JamesServerExtension jamesServerExtension = baseExtension()
         .lifeCycle(JamesServerExtension.Lifecycle.PER_CLASS)
         .build();
+
+    @Test
+    void shouldStartWithScanningSearch(GuiceJamesServer server) {
+        assertThat(server.isStarted()).isTrue();
+    }
 }
\ No newline at end of file


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


(james-project) 10/15: [BUILD] [james-server-postgres-app] Compact scanning search tests for Postgres app

Posted by hq...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 4df00960584ff937de28f9d73acd9a6a91dcc9cb
Author: Quan Tran <hq...@linagora.com>
AuthorDate: Thu Sep 18 12:01:20 2025 +0700

    [BUILD] [james-server-postgres-app] Compact scanning search tests for Postgres app
    
    Start with scanning search is a good enough test.
---
 ...st.java => PostgresWithScanningSearchTest.java} |  9 +++-
 .../james/WithScanningSearchMutableTest.java       | 56 ----------------------
 2 files changed, 8 insertions(+), 57 deletions(-)

diff --git a/server/apps/postgres-app/src/test/java/org/apache/james/WithScanningSearchImmutableTest.java b/server/apps/postgres-app/src/test/java/org/apache/james/PostgresWithScanningSearchTest.java
similarity index 89%
rename from server/apps/postgres-app/src/test/java/org/apache/james/WithScanningSearchImmutableTest.java
rename to server/apps/postgres-app/src/test/java/org/apache/james/PostgresWithScanningSearchTest.java
index a5e653af6d..9c7545f100 100644
--- a/server/apps/postgres-app/src/test/java/org/apache/james/WithScanningSearchImmutableTest.java
+++ b/server/apps/postgres-app/src/test/java/org/apache/james/PostgresWithScanningSearchTest.java
@@ -20,12 +20,14 @@
 package org.apache.james;
 
 import static org.apache.james.data.UsersRepositoryModuleChooser.Implementation.DEFAULT;
+import static org.assertj.core.api.Assertions.assertThat;
 
 import org.apache.james.PostgresJamesConfiguration.EventBusImpl;
 import org.apache.james.backends.postgres.PostgresExtension;
+import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 
-public class WithScanningSearchImmutableTest implements JamesServerConcreteContract {
+public class PostgresWithScanningSearchTest {
     static PostgresExtension postgresExtension = PostgresExtension.empty();
 
     @RegisterExtension
@@ -41,4 +43,9 @@ public class WithScanningSearchImmutableTest implements JamesServerConcreteContr
         .extension(postgresExtension)
         .lifeCycle(JamesServerExtension.Lifecycle.PER_CLASS)
         .build();
+
+    @Test
+    void shouldStart(GuiceJamesServer server) {
+        assertThat(server.isStarted()).isTrue();
+    }
 }
diff --git a/server/apps/postgres-app/src/test/java/org/apache/james/WithScanningSearchMutableTest.java b/server/apps/postgres-app/src/test/java/org/apache/james/WithScanningSearchMutableTest.java
deleted file mode 100644
index d9c8ef3477..0000000000
--- a/server/apps/postgres-app/src/test/java/org/apache/james/WithScanningSearchMutableTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james;
-
-import static org.apache.james.data.UsersRepositoryModuleChooser.Implementation.DEFAULT;
-
-import org.apache.james.PostgresJamesConfiguration.EventBusImpl;
-import org.apache.james.backends.postgres.PostgresExtension;
-import org.apache.james.modules.protocols.ImapGuiceProbe;
-import org.apache.james.modules.protocols.SmtpGuiceProbe;
-import org.junit.jupiter.api.extension.RegisterExtension;
-
-public class WithScanningSearchMutableTest implements MailsShouldBeWellReceived {
-    static PostgresExtension postgresExtension = PostgresExtension.empty();
-
-    @RegisterExtension
-    static JamesServerExtension jamesServerExtension = new JamesServerBuilder<PostgresJamesConfiguration>(tmpDir ->
-        PostgresJamesConfiguration.builder()
-            .workingDirectory(tmpDir)
-            .configurationFromClasspath()
-            .searchConfiguration(SearchConfiguration.scanning())
-            .usersRepository(DEFAULT)
-            .eventBusImpl(EventBusImpl.IN_MEMORY)
-            .build())
-        .server(PostgresJamesServerMain::createServer)
-        .extension(postgresExtension)
-        .lifeCycle(JamesServerExtension.Lifecycle.PER_TEST)
-        .build();
-
-    @Override
-    public int imapPort(GuiceJamesServer server) {
-        return server.getProbe(ImapGuiceProbe.class).getImapPort();
-    }
-
-    @Override
-    public int smtpPort(GuiceJamesServer server) {
-        return server.getProbe(SmtpGuiceProbe.class).getSmtpPort().getValue();
-    }
-}


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


(james-project) 03/15: [BUILD] [james-server-distributed-app] Compact WithoutMailQueueViewTest

Posted by hq...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5ab8c193e6da34add4275e7d03d4b9597441aadb
Author: Quan Tran <hq...@linagora.com>
AuthorDate: Thu Sep 18 11:23:54 2025 +0700

    [BUILD] [james-server-distributed-app] Compact WithoutMailQueueViewTest
    
    Make sure James start with no mail queue is good enough.
---
 ...ueViewImmutableTest.java => WithoutMailQueueViewTest.java} | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/server/apps/distributed-app/src/test/java/org/apache/james/WithoutMailQueueViewImmutableTest.java b/server/apps/distributed-app/src/test/java/org/apache/james/WithoutMailQueueViewTest.java
similarity index 91%
rename from server/apps/distributed-app/src/test/java/org/apache/james/WithoutMailQueueViewImmutableTest.java
rename to server/apps/distributed-app/src/test/java/org/apache/james/WithoutMailQueueViewTest.java
index 73abe8e56a..5490dd19cf 100644
--- a/server/apps/distributed-app/src/test/java/org/apache/james/WithoutMailQueueViewImmutableTest.java
+++ b/server/apps/distributed-app/src/test/java/org/apache/james/WithoutMailQueueViewTest.java
@@ -19,15 +19,17 @@
 
 package org.apache.james;
 
-import org.apache.james.jmap.JmapJamesServerContract;
+import static org.assertj.core.api.Assertions.assertThat;
+
 import org.apache.james.modules.AwsS3BlobStoreExtension;
 import org.apache.james.modules.RabbitMQExtension;
 import org.apache.james.modules.TestJMAPServerModule;
 import org.apache.james.modules.blobstore.BlobStoreConfiguration;
 import org.apache.james.modules.queue.rabbitmq.MailQueueViewChoice;
+import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 
-class WithoutMailQueueViewImmutableTest implements JmapJamesServerContract, JamesServerConcreteContract {
+class WithoutMailQueueViewTest {
     static JamesServerBuilder<CassandraRabbitMQJamesConfiguration> baseExtension() {
         return new JamesServerBuilder<CassandraRabbitMQJamesConfiguration>(tmpDir ->
             CassandraRabbitMQJamesConfiguration.builder()
@@ -52,4 +54,9 @@ class WithoutMailQueueViewImmutableTest implements JmapJamesServerContract, Jame
     static JamesServerExtension jamesServerExtension = baseExtension()
         .lifeCycle(JamesServerExtension.Lifecycle.PER_CLASS)
         .build();
+
+    @Test
+    void shouldStart(GuiceJamesServer server) {
+        assertThat(server.isStarted()).isTrue();
+    }
 }
\ No newline at end of file


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


(james-project) 08/15: [BUILD] [james-server-distributed-app] Compact blob store caching tests

Posted by hq...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 7993b9d10632141a958e44ad82bca29cb7a4a8e4
Author: Quan Tran <hq...@linagora.com>
AuthorDate: Thu Sep 18 11:47:56 2025 +0700

    [BUILD] [james-server-distributed-app] Compact blob store caching tests
---
 .../org/apache/james/CassandraCacheQueryTest.java  |  2 +-
 .../org/apache/james/WithCacheMutableTest.java     | 29 ----------------------
 ...hCacheImmutableTest.java => WithCacheTest.java} | 22 ++++++++--------
 3 files changed, 11 insertions(+), 42 deletions(-)

diff --git a/server/apps/distributed-app/src/test/java/org/apache/james/CassandraCacheQueryTest.java b/server/apps/distributed-app/src/test/java/org/apache/james/CassandraCacheQueryTest.java
index dc7eb3dd36..a574237d16 100644
--- a/server/apps/distributed-app/src/test/java/org/apache/james/CassandraCacheQueryTest.java
+++ b/server/apps/distributed-app/src/test/java/org/apache/james/CassandraCacheQueryTest.java
@@ -96,7 +96,7 @@ class CassandraCacheQueryTest {
     }
 
     @RegisterExtension
-    static JamesServerExtension jamesServerExtension = WithCacheImmutableTest.baseExtensionBuilder()
+    static JamesServerExtension jamesServerExtension = WithCacheTest.baseExtensionBuilder()
         .lifeCycle(JamesServerExtension.Lifecycle.PER_CLASS)
         .overrideServerModule(new TestingSessionModule())
         .build();
diff --git a/server/apps/distributed-app/src/test/java/org/apache/james/WithCacheMutableTest.java b/server/apps/distributed-app/src/test/java/org/apache/james/WithCacheMutableTest.java
deleted file mode 100644
index 9ec61a0857..0000000000
--- a/server/apps/distributed-app/src/test/java/org/apache/james/WithCacheMutableTest.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james;
-
-import org.junit.jupiter.api.extension.RegisterExtension;
-
-class WithCacheMutableTest implements MailsShouldBeWellReceivedConcreteContract {
-    @RegisterExtension
-    static JamesServerExtension jamesServerExtension = WithCacheImmutableTest.baseExtensionBuilder()
-        .lifeCycle(JamesServerExtension.Lifecycle.PER_TEST)
-        .build();
-}
\ No newline at end of file
diff --git a/server/apps/distributed-app/src/test/java/org/apache/james/WithCacheImmutableTest.java b/server/apps/distributed-app/src/test/java/org/apache/james/WithCacheTest.java
similarity index 87%
rename from server/apps/distributed-app/src/test/java/org/apache/james/WithCacheImmutableTest.java
rename to server/apps/distributed-app/src/test/java/org/apache/james/WithCacheTest.java
index 0dd225a359..68f3cab9dc 100644
--- a/server/apps/distributed-app/src/test/java/org/apache/james/WithCacheImmutableTest.java
+++ b/server/apps/distributed-app/src/test/java/org/apache/james/WithCacheTest.java
@@ -19,30 +19,23 @@
 
 package org.apache.james;
 
-import org.apache.james.jmap.JmapJamesServerContract;
 import org.apache.james.modules.AwsS3BlobStoreExtension;
 import org.apache.james.modules.RabbitMQExtension;
 import org.apache.james.modules.TestJMAPServerModule;
 import org.apache.james.modules.blobstore.BlobStoreConfiguration;
 import org.junit.jupiter.api.extension.RegisterExtension;
 
-
-class WithCacheImmutableTest implements JmapJamesServerContract, JamesServerConcreteContract {
-    @RegisterExtension
-    static JamesServerExtension jamesServerExtension = baseExtensionBuilder()
-        .lifeCycle(JamesServerExtension.Lifecycle.PER_CLASS)
-        .build();
-
+class WithCacheTest implements MailsShouldBeWellReceivedConcreteContract {
     static JamesServerBuilder<CassandraRabbitMQJamesConfiguration> baseExtensionBuilder() {
         return new JamesServerBuilder<CassandraRabbitMQJamesConfiguration>(tmpDir ->
             CassandraRabbitMQJamesConfiguration.builder()
                 .workingDirectory(tmpDir)
                 .configurationFromClasspath()
                 .blobStore(BlobStoreConfiguration.builder()
-                        .s3()
-                        .enableCache()
-                        .deduplication()
-                        .noCryptoConfig())
+                    .s3()
+                    .enableCache()
+                    .deduplication()
+                    .noCryptoConfig())
                 .searchConfiguration(SearchConfiguration.openSearch())
                 .build())
             .extension(new DockerOpenSearchExtension())
@@ -52,4 +45,9 @@ class WithCacheImmutableTest implements JmapJamesServerContract, JamesServerConc
             .server(configuration -> CassandraRabbitMQJamesServerMain.createServer(configuration)
                 .overrideWith(new TestJMAPServerModule()));
     }
+
+    @RegisterExtension
+    static JamesServerExtension jamesServerExtension = baseExtensionBuilder()
+        .lifeCycle(JamesServerExtension.Lifecycle.PER_TEST)
+        .build();
 }
\ No newline at end of file


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


(james-project) 12/15: [BUILD] [james-server-cassandra-app] Smoke tests for Cassandra app

Posted by hq...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5f1f537512a09c56b6311348804e8b680f6adffc
Author: Quan Tran <hq...@linagora.com>
AuthorDate: Thu Sep 18 12:10:43 2025 +0700

    [BUILD] [james-server-cassandra-app] Smoke tests for Cassandra app
---
 server/apps/cassandra-app/pom.xml                              | 10 ++++++++++
 .../test/java/org/apache/james/CassandraJamesServerTest.java   |  3 +++
 .../java/org/apache/james/CassandraLdapJamesServerTest.java    |  3 +++
 .../test/java/org/apache/james/WithCassandraBlobStoreTest.java |  3 +++
 4 files changed, 19 insertions(+)

diff --git a/server/apps/cassandra-app/pom.xml b/server/apps/cassandra-app/pom.xml
index c8500eec47..e9d69b3213 100644
--- a/server/apps/cassandra-app/pom.xml
+++ b/server/apps/cassandra-app/pom.xml
@@ -326,6 +326,16 @@
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <groups combine.self="override">BasicFeature</groups>
+                    <properties>
+                        <includeTags>junit5</includeTags>
+                    </properties>
+                </configuration>
+            </plugin>
             <plugin>
                 <groupId>com.google.cloud.tools</groupId>
                 <artifactId>jib-maven-plugin</artifactId>
diff --git a/server/apps/cassandra-app/src/test/java/org/apache/james/CassandraJamesServerTest.java b/server/apps/cassandra-app/src/test/java/org/apache/james/CassandraJamesServerTest.java
index b138310558..e8109c56e0 100644
--- a/server/apps/cassandra-app/src/test/java/org/apache/james/CassandraJamesServerTest.java
+++ b/server/apps/cassandra-app/src/test/java/org/apache/james/CassandraJamesServerTest.java
@@ -22,11 +22,14 @@ package org.apache.james;
 import static org.assertj.core.api.Assertions.assertThat;
 
 import org.apache.james.jmap.JmapJamesServerContract;
+import org.apache.james.junit.categories.BasicFeature;
 import org.apache.james.modules.ConfigurationProbe;
 import org.apache.james.modules.TestJMAPServerModule;
+import org.junit.jupiter.api.Tag;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 
+@Tag(BasicFeature.TAG)
 class CassandraJamesServerTest implements JamesServerConcreteContract, JmapJamesServerContract {
     @RegisterExtension
     static JamesServerExtension testExtension = TestingDistributedJamesServerBuilder.withSearchConfiguration(SearchConfiguration.openSearch())
diff --git a/server/apps/cassandra-app/src/test/java/org/apache/james/CassandraLdapJamesServerTest.java b/server/apps/cassandra-app/src/test/java/org/apache/james/CassandraLdapJamesServerTest.java
index 02f32e546d..54744e02e9 100644
--- a/server/apps/cassandra-app/src/test/java/org/apache/james/CassandraLdapJamesServerTest.java
+++ b/server/apps/cassandra-app/src/test/java/org/apache/james/CassandraLdapJamesServerTest.java
@@ -31,6 +31,7 @@ import org.apache.commons.net.imap.IMAPClient;
 import org.apache.james.core.Domain;
 import org.apache.james.data.LdapTestExtension;
 import org.apache.james.data.UsersRepositoryModuleChooser;
+import org.apache.james.junit.categories.BasicFeature;
 import org.apache.james.modules.TestJMAPServerModule;
 import org.apache.james.modules.protocols.ImapGuiceProbe;
 import org.apache.james.modules.protocols.SmtpGuiceProbe;
@@ -40,9 +41,11 @@ import org.apache.james.utils.SpoolerProbe;
 import org.apache.james.utils.TestIMAPClient;
 import org.awaitility.Awaitility;
 import org.awaitility.core.ConditionFactory;
+import org.junit.jupiter.api.Tag;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 
+@Tag(BasicFeature.TAG)
 class CassandraLdapJamesServerTest implements JamesServerConcreteContract {
     private static Duration slowPacedPollInterval = ONE_HUNDRED_MILLISECONDS;
     private static ConditionFactory calmlyAwait = Awaitility.with()
diff --git a/server/apps/cassandra-app/src/test/java/org/apache/james/WithCassandraBlobStoreTest.java b/server/apps/cassandra-app/src/test/java/org/apache/james/WithCassandraBlobStoreTest.java
index 217bb7c73b..a7f0e7b021 100644
--- a/server/apps/cassandra-app/src/test/java/org/apache/james/WithCassandraBlobStoreTest.java
+++ b/server/apps/cassandra-app/src/test/java/org/apache/james/WithCassandraBlobStoreTest.java
@@ -34,6 +34,7 @@ import org.apache.james.backends.cassandra.StatementRecorder;
 import org.apache.james.backends.cassandra.TestingSession;
 import org.apache.james.backends.cassandra.init.SessionWithInitializedTablesFactory;
 import org.apache.james.core.Domain;
+import org.apache.james.junit.categories.BasicFeature;
 import org.apache.james.mailbox.DefaultMailboxes;
 import org.apache.james.mailbox.store.BatchSizes;
 import org.apache.james.modules.MailboxProbeImpl;
@@ -43,6 +44,7 @@ import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.GuiceProbe;
 import org.apache.james.utils.SMTPMessageSender;
 import org.apache.james.utils.SpoolerProbe;
+import org.junit.jupiter.api.Tag;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
 
@@ -58,6 +60,7 @@ import com.google.inject.multibindings.Multibinder;
 import reactor.core.publisher.Mono;
 import reactor.core.scheduler.Schedulers;
 
+@Tag(BasicFeature.TAG)
 class WithCassandraBlobStoreTest implements MailsShouldBeWellReceivedConcreteContract {
     private static class TestingSessionProbe implements GuiceProbe {
         private final TestingSession testingSession;


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


(james-project) 06/15: [BUILD] [james-server-distributed-app] Compact Cassandra + passThrough mode blob store tests

Posted by hq...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit a68813ce39fc53face27e0b26a260e4280ee1145
Author: Quan Tran <hq...@linagora.com>
AuthorDate: Thu Sep 18 11:43:57 2025 +0700

    [BUILD] [james-server-distributed-app] Compact Cassandra + passThrough mode blob store tests
---
 ...CassandraPassThroughBlobStoreImmutableTest.java | 47 ----------------------
 ... => WithCassandraPassThroughBlobStoreTest.java} |  2 +-
 2 files changed, 1 insertion(+), 48 deletions(-)

diff --git a/server/apps/distributed-app/src/test/java/org/apache/james/WithCassandraPassThroughBlobStoreImmutableTest.java b/server/apps/distributed-app/src/test/java/org/apache/james/WithCassandraPassThroughBlobStoreImmutableTest.java
deleted file mode 100644
index bb5f10b2b7..0000000000
--- a/server/apps/distributed-app/src/test/java/org/apache/james/WithCassandraPassThroughBlobStoreImmutableTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james;
-
-import org.apache.james.jmap.JmapJamesServerContract;
-import org.apache.james.modules.RabbitMQExtension;
-import org.apache.james.modules.TestJMAPServerModule;
-import org.apache.james.modules.blobstore.BlobStoreConfiguration;
-import org.junit.jupiter.api.extension.RegisterExtension;
-
-public class WithCassandraPassThroughBlobStoreImmutableTest implements JmapJamesServerContract, JamesServerConcreteContract, CassandraMessageOperationsContract {
-    @RegisterExtension
-    static JamesServerExtension jamesServerExtension = new JamesServerBuilder<CassandraRabbitMQJamesConfiguration>(tmpDir ->
-        CassandraRabbitMQJamesConfiguration.builder()
-        .workingDirectory(tmpDir)
-                .configurationFromClasspath()
-                .blobStore(BlobStoreConfiguration.cassandra()
-                    .passthrough()
-                    .noCryptoConfig())
-        .searchConfiguration(SearchConfiguration.openSearch())
-        .build())
-        .server(configuration -> CassandraRabbitMQJamesServerMain.createServer(configuration)
-        .overrideWith(new TestJMAPServerModule())
-        .overrideWith(new TestingSessionModule()))
-        .extension(new DockerOpenSearchExtension())
-        .extension(new CassandraExtension())
-        .extension(new RabbitMQExtension())
-        .lifeCycle(JamesServerExtension.Lifecycle.PER_CLASS)
-        .build();
-}
diff --git a/server/apps/distributed-app/src/test/java/org/apache/james/WithCassandraPassThroughBlobStoreMutableTest.java b/server/apps/distributed-app/src/test/java/org/apache/james/WithCassandraPassThroughBlobStoreTest.java
similarity index 97%
rename from server/apps/distributed-app/src/test/java/org/apache/james/WithCassandraPassThroughBlobStoreMutableTest.java
rename to server/apps/distributed-app/src/test/java/org/apache/james/WithCassandraPassThroughBlobStoreTest.java
index 91c831b02d..83a11139ad 100644
--- a/server/apps/distributed-app/src/test/java/org/apache/james/WithCassandraPassThroughBlobStoreMutableTest.java
+++ b/server/apps/distributed-app/src/test/java/org/apache/james/WithCassandraPassThroughBlobStoreTest.java
@@ -48,7 +48,7 @@ import com.datastax.oss.driver.api.core.CqlSession;
 import com.google.common.collect.ImmutableList;
 import com.google.common.io.Resources;
 
-public class WithCassandraPassThroughBlobStoreMutableTest implements MailsShouldBeWellReceivedConcreteContract, CassandraMessageOperationsContract {
+public class WithCassandraPassThroughBlobStoreTest implements MailsShouldBeWellReceivedConcreteContract, CassandraMessageOperationsContract {
     private static final String JAMES_SERVER_HOST = "127.0.0.1";
     private static final String YET_ANOTHER_USER = "yet-another-user@" + DOMAIN;
 


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


(james-project) 05/15: [BUILD] [james-server-distributed-app] Compact AWS S3 test suite

Posted by hq...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 872d7aedc440a2d95ecd262829e6ad99177aada5
Author: Quan Tran <hq...@linagora.com>
AuthorDate: Thu Sep 18 11:42:21 2025 +0700

    [BUILD] [james-server-distributed-app] Compact AWS S3 test suite
---
 .../james/WithDefaultAwsS3ImmutableTest.java       | 32 ----------------------
 ...3MutableTest.java => WithDefaultAwsS3Test.java} |  2 +-
 2 files changed, 1 insertion(+), 33 deletions(-)

diff --git a/server/apps/distributed-app/src/test/java/org/apache/james/WithDefaultAwsS3ImmutableTest.java b/server/apps/distributed-app/src/test/java/org/apache/james/WithDefaultAwsS3ImmutableTest.java
deleted file mode 100644
index 8515f00607..0000000000
--- a/server/apps/distributed-app/src/test/java/org/apache/james/WithDefaultAwsS3ImmutableTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james;
-
-import org.apache.james.jmap.JmapJamesServerContract;
-import org.apache.james.modules.AwsS3BlobStoreExtension;
-import org.junit.jupiter.api.extension.RegisterExtension;
-
-public class WithDefaultAwsS3ImmutableTest implements JmapJamesServerContract, JamesServerConcreteContract {
-    @RegisterExtension
-    static JamesServerExtension jamesServerExtension = CassandraRabbitMQJamesServerFixture.baseExtensionBuilder()
-        .extension(new AwsS3BlobStoreExtension())
-        .lifeCycle(JamesServerExtension.Lifecycle.PER_CLASS)
-        .build();
-}
diff --git a/server/apps/distributed-app/src/test/java/org/apache/james/WithDefaultAwsS3MutableTest.java b/server/apps/distributed-app/src/test/java/org/apache/james/WithDefaultAwsS3Test.java
similarity index 92%
rename from server/apps/distributed-app/src/test/java/org/apache/james/WithDefaultAwsS3MutableTest.java
rename to server/apps/distributed-app/src/test/java/org/apache/james/WithDefaultAwsS3Test.java
index f353cfbee4..655594e5ce 100644
--- a/server/apps/distributed-app/src/test/java/org/apache/james/WithDefaultAwsS3MutableTest.java
+++ b/server/apps/distributed-app/src/test/java/org/apache/james/WithDefaultAwsS3Test.java
@@ -22,7 +22,7 @@ package org.apache.james;
 import org.apache.james.modules.AwsS3BlobStoreExtension;
 import org.junit.jupiter.api.extension.RegisterExtension;
 
-public class WithDefaultAwsS3MutableTest implements MailsShouldBeWellReceivedConcreteContract {
+public class WithDefaultAwsS3Test implements MailsShouldBeWellReceivedConcreteContract {
     @RegisterExtension
     static JamesServerExtension jamesServerExtension = CassandraRabbitMQJamesServerFixture.baseExtensionBuilder()
         .extension(new AwsS3BlobStoreExtension())


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


(james-project) 09/15: [BUILD] [james-server-distributed-app] Remove unused CassandraRabbitMQAwsS3JmapTestRule

Posted by hq...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 6d918dab317664b9e9faaee0b43d5583811b9ab0
Author: Quan Tran <hq...@linagora.com>
AuthorDate: Thu Sep 18 11:54:38 2025 +0700

    [BUILD] [james-server-distributed-app] Remove unused CassandraRabbitMQAwsS3JmapTestRule
---
 .../james/CassandraRabbitMQAwsS3JmapTestRule.java  | 101 ---------------------
 1 file changed, 101 deletions(-)

diff --git a/server/apps/distributed-app/src/test/java/org/apache/james/CassandraRabbitMQAwsS3JmapTestRule.java b/server/apps/distributed-app/src/test/java/org/apache/james/CassandraRabbitMQAwsS3JmapTestRule.java
deleted file mode 100644
index 21a4b5062d..0000000000
--- a/server/apps/distributed-app/src/test/java/org/apache/james/CassandraRabbitMQAwsS3JmapTestRule.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james;
-
-import java.io.IOException;
-
-import org.apache.james.backends.rabbitmq.DockerRabbitMQSingleton;
-import org.apache.james.modules.TestJMAPServerModule;
-import org.apache.james.modules.TestRabbitMQModule;
-import org.apache.james.modules.blobstore.BlobStoreConfiguration;
-import org.apache.james.modules.objectstorage.aws.s3.DockerAwsS3TestRule;
-import org.apache.james.webadmin.WebAdminConfiguration;
-import org.junit.rules.TemporaryFolder;
-import org.junit.rules.TestRule;
-import org.junit.runner.Description;
-import org.junit.runners.model.Statement;
-
-import com.google.inject.Module;
-
-public class CassandraRabbitMQAwsS3JmapTestRule implements TestRule {
-
-    public static final int TWO_SECONDS = 2000;
-    private final TemporaryFolder temporaryFolder;
-
-    public static CassandraRabbitMQAwsS3JmapTestRule defaultTestRule() {
-        return new CassandraRabbitMQAwsS3JmapTestRule();
-    }
-
-    private final GuiceModuleTestRule guiceModuleTestRule;
-    private final DockerOpenSearchRule dockerOpenSearchRule;
-
-    public CassandraRabbitMQAwsS3JmapTestRule(GuiceModuleTestRule... guiceModuleTestRule) {
-        TempFilesystemTestRule tempFilesystemTestRule = new TempFilesystemTestRule();
-        this.dockerOpenSearchRule = new DockerOpenSearchRule();
-        this.temporaryFolder = tempFilesystemTestRule.getTemporaryFolder();
-        this.guiceModuleTestRule =
-            AggregateGuiceModuleTestRule
-                .of(guiceModuleTestRule)
-                .aggregate(dockerOpenSearchRule)
-                .aggregate(tempFilesystemTestRule);
-    }
-
-    public GuiceJamesServer jmapServer(Module... additionals) throws IOException {
-        CassandraRabbitMQJamesConfiguration configuration = CassandraRabbitMQJamesConfiguration.builder()
-            .workingDirectory(temporaryFolder.newFolder())
-            .configurationFromClasspath()
-            .blobStore(BlobStoreConfiguration.builder()
-                    .s3()
-                    .disableCache()
-                    .deduplication()
-                    .noCryptoConfig())
-            .searchConfiguration(SearchConfiguration.openSearch())
-            .build();
-
-        return CassandraRabbitMQJamesServerMain.createServer(configuration)
-            .overrideWith(new TestRabbitMQModule(DockerRabbitMQSingleton.SINGLETON))
-            .overrideWith(new DockerAwsS3TestRule().getModule())
-            .overrideWith(new TestJMAPServerModule())
-            .overrideWith(guiceModuleTestRule.getModule())
-            .overrideWith((binder -> binder.bind(CleanupTasksPerformer.class).asEagerSingleton()))
-            .overrideWith(binder -> binder.bind(WebAdminConfiguration.class).toInstance(WebAdminConfiguration.TEST_CONFIGURATION))
-            .overrideWith(additionals);
-    }
-
-    @Override
-    public Statement apply(Statement base, Description description) {
-        return guiceModuleTestRule.apply(base, description);
-    }
-
-    public void await() {
-        awaitProcessingStart();
-        guiceModuleTestRule.await();
-    }
-
-    private void awaitProcessingStart() {
-        // As the RabbitMQEventBus is asynchronous we have otherwise no guaranties that the processing to be awaiting for did start
-        try {
-            Thread.sleep(TWO_SECONDS);
-        } catch (InterruptedException e) {
-            throw new RuntimeException(e);
-        }
-    }
-}
-


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


(james-project) 15/15: [BUILD] [james-server-cli-integration-tests] Better JVM isolation

Posted by hq...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 1b8f11835f76654602b3881835732de30a4938b7
Author: Quan Tran <hq...@linagora.com>
AuthorDate: Fri Sep 19 09:18:53 2025 +0700

    [BUILD] [james-server-cli-integration-tests] Better JVM isolation
    
    On CI:
    10:40:00.379 [ERROR] o.a.j.GuiceJamesServer - Fatal error while starting James
    javax.management.InstanceAlreadyExistsException: org.apache.james:type=component,component=mailetcontainer,name=processor,processor=local-address-error
    
    cf https://ci-builds.apache.org/job/james/job/ApacheJames/job/PR-2813/4/testReport/
---
 server/apps/cli-integration-tests/pom.xml | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/server/apps/cli-integration-tests/pom.xml b/server/apps/cli-integration-tests/pom.xml
index 3d8e089724..f8bee49343 100644
--- a/server/apps/cli-integration-tests/pom.xml
+++ b/server/apps/cli-integration-tests/pom.xml
@@ -81,4 +81,16 @@
             <artifactId>mockito-core</artifactId>
         </dependency>
     </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <reuseForks>false</reuseForks>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 </project>


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


(james-project) 07/15: [BUILD] [james-server-distributed-app] Compact Cassandra + deduplication mode blob store tests

Posted by hq...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit bde20f4938efdb45e5b44a0727c268a11e283840
Author: Quan Tran <hq...@linagora.com>
AuthorDate: Thu Sep 18 11:44:56 2025 +0700

    [BUILD] [james-server-distributed-app] Compact Cassandra + deduplication mode blob store tests
---
 ...ssandraDeduplicationBlobStoreImmutableTest.java | 47 ----------------------
 ...> WithCassandraDeduplicationBlobStoreTest.java} |  2 +-
 2 files changed, 1 insertion(+), 48 deletions(-)

diff --git a/server/apps/distributed-app/src/test/java/org/apache/james/WithCassandraDeduplicationBlobStoreImmutableTest.java b/server/apps/distributed-app/src/test/java/org/apache/james/WithCassandraDeduplicationBlobStoreImmutableTest.java
deleted file mode 100644
index a7db5ff20d..0000000000
--- a/server/apps/distributed-app/src/test/java/org/apache/james/WithCassandraDeduplicationBlobStoreImmutableTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you under the Apache License, Version 2.0 (the            *
- * "License"); you may not use this file except in compliance   *
- * with the License.  You may obtain a copy of the License at   *
- *                                                              *
- *   http://www.apache.org/licenses/LICENSE-2.0                 *
- *                                                              *
- * Unless required by applicable law or agreed to in writing,   *
- * software distributed under the License is distributed on an  *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
- * KIND, either express or implied.  See the License for the    *
- * specific language governing permissions and limitations      *
- * under the License.                                           *
- ****************************************************************/
-
-package org.apache.james;
-
-import org.apache.james.jmap.JmapJamesServerContract;
-import org.apache.james.modules.RabbitMQExtension;
-import org.apache.james.modules.TestJMAPServerModule;
-import org.apache.james.modules.blobstore.BlobStoreConfiguration;
-import org.junit.jupiter.api.extension.RegisterExtension;
-
-public class WithCassandraDeduplicationBlobStoreImmutableTest implements JmapJamesServerContract, JamesServerConcreteContract, CassandraMessageOperationsContract {
-    @RegisterExtension
-    static JamesServerExtension jamesServerExtension = new JamesServerBuilder<CassandraRabbitMQJamesConfiguration>(tmpDir ->
-        CassandraRabbitMQJamesConfiguration.builder()
-            .workingDirectory(tmpDir)
-            .configurationFromClasspath()
-            .blobStore(BlobStoreConfiguration.cassandra()
-                .deduplication()
-                .noCryptoConfig())
-            .searchConfiguration(SearchConfiguration.openSearch())
-            .build())
-        .server(configuration -> CassandraRabbitMQJamesServerMain.createServer(configuration)
-            .overrideWith(new TestJMAPServerModule())
-            .overrideWith(new TestingSessionModule()))
-        .extension(new DockerOpenSearchExtension())
-        .extension(new CassandraExtension())
-        .extension(new RabbitMQExtension())
-        .lifeCycle(JamesServerExtension.Lifecycle.PER_CLASS)
-        .build();
-}
diff --git a/server/apps/distributed-app/src/test/java/org/apache/james/WithCassandraDeduplicationBlobStoreMutableTest.java b/server/apps/distributed-app/src/test/java/org/apache/james/WithCassandraDeduplicationBlobStoreTest.java
similarity index 97%
rename from server/apps/distributed-app/src/test/java/org/apache/james/WithCassandraDeduplicationBlobStoreMutableTest.java
rename to server/apps/distributed-app/src/test/java/org/apache/james/WithCassandraDeduplicationBlobStoreTest.java
index c1671caaf9..a5db5592fd 100644
--- a/server/apps/distributed-app/src/test/java/org/apache/james/WithCassandraDeduplicationBlobStoreMutableTest.java
+++ b/server/apps/distributed-app/src/test/java/org/apache/james/WithCassandraDeduplicationBlobStoreTest.java
@@ -48,7 +48,7 @@ import com.datastax.oss.driver.api.core.CqlSession;
 import com.google.common.collect.ImmutableList;
 import com.google.common.io.Resources;
 
-public class WithCassandraDeduplicationBlobStoreMutableTest implements MailsShouldBeWellReceivedConcreteContract, CassandraMessageOperationsContract {
+public class WithCassandraDeduplicationBlobStoreTest implements MailsShouldBeWellReceivedConcreteContract, CassandraMessageOperationsContract {
     private static final String JAMES_SERVER_HOST = "127.0.0.1";
     private static final String YET_ANOTHER_USER = "yet-another-user@" + DOMAIN;
 


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