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 <hqt...@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-unsubscr...@james.apache.org For additional commands, e-mail: notifications-h...@james.apache.org