From 4c1f13636362e2e37243251bc9c0b618cf0a36e6 Mon Sep 17 00:00:00 2001 From: Anders Lindh Olsson Date: Tue, 14 Apr 2026 12:46:40 +0200 Subject: [PATCH 01/10] chore(deps): remove google-collections --- pom.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pom.xml b/pom.xml index d3f1719b..d036c23b 100644 --- a/pom.xml +++ b/pom.xml @@ -101,11 +101,6 @@ guava 32.1.3-jre - - com.google.collections - google-collections - 1.0 - org.springframework.boot spring-boot-starter-security From e9efbc78e43c7219e0c3a1d6aa49b8fbb00f9e5c Mon Sep 17 00:00:00 2001 From: Anders Lindh Olsson Date: Tue, 14 Apr 2026 12:58:22 +0200 Subject: [PATCH 02/10] chore(deps): upgrade core-pva to 5.0.2 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d036c23b..a9b1305e 100644 --- a/pom.xml +++ b/pom.xml @@ -129,7 +129,7 @@ org.phoebus core-pva - 4.7.3 + 5.0.2 From 0c4256edab2b7862f2310a0b8facd43fa798ce41 Mon Sep 17 00:00:00 2001 From: Anders Lindh Olsson Date: Tue, 14 Apr 2026 12:59:25 +0200 Subject: [PATCH 03/10] feat(deps): bump Spring Boot to 4.0.5 Pin elasticsearch-java to 8.18.0 (defer ES 9 migration) and testcontainers to 1.19.3 (defer TC 2.x migration). Drop now-BOM-managed version pins for junit-jupiter and jackson-core. --- pom.xml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index a9b1305e..c7106538 100644 --- a/pom.xml +++ b/pom.xml @@ -36,10 +36,8 @@ UTF-8 - 3.5.7 - 3.0.1 + 4.0.5 8.18.0 - 5.10.0 true true true @@ -59,6 +57,12 @@ pom import + + + org.testcontainers + testcontainers + 1.19.3 + @@ -78,7 +82,6 @@ org.junit.jupiter junit-jupiter - ${junit-jupiter.version} test @@ -89,7 +92,6 @@ tools.jackson.core jackson-core - ${jackson.version} jakarta.json From 09ae7d9d9eedfa489b9e1c96493c8f3aac836a8f Mon Sep 17 00:00:00 2001 From: Anders Lindh Olsson Date: Tue, 14 Apr 2026 12:59:48 +0200 Subject: [PATCH 04/10] fix(web): adapt to Spring Boot 4 web module changes Rename spring-boot-starter-web to spring-boot-starter-webmvc (old name removed). Remove true from the Maven plugin (embedded launch scripts dropped; java -jar still works). Fix HttpConnectorConfig: TomcatServletWebServerFactory and ServletWebServerFactory moved to new packages; rename addAdditionalTomcatConnectors to addAdditionalConnectors. --- pom.xml | 9 +++++---- .../configuration/HttpConnectorConfig.java | 15 ++++----------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/pom.xml b/pom.xml index c7106538..133914d5 100644 --- a/pom.xml +++ b/pom.xml @@ -72,7 +72,11 @@ org.springframework.boot - spring-boot-starter-web + spring-boot-starter-webmvc + + + org.springframework.boot + spring-boot-restclient org.springframework.data @@ -247,9 +251,6 @@ org.springframework.boot spring-boot-maven-plugin ${spring.boot-version} - - true - diff --git a/src/main/java/org/phoebus/channelfinder/configuration/HttpConnectorConfig.java b/src/main/java/org/phoebus/channelfinder/configuration/HttpConnectorConfig.java index f4659fbe..2c50e01b 100644 --- a/src/main/java/org/phoebus/channelfinder/configuration/HttpConnectorConfig.java +++ b/src/main/java/org/phoebus/channelfinder/configuration/HttpConnectorConfig.java @@ -3,28 +3,21 @@ import org.apache.catalina.connector.Connector; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; -import org.springframework.boot.web.servlet.server.ServletWebServerFactory; +import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory; +import org.springframework.boot.web.server.WebServerFactoryCustomizer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; @Configuration -@PropertySource(value = "classpath:application.properties") public class HttpConnectorConfig { - @Value("${server.http.enable:true}") - private boolean httpEnabled; - @Value("${server.http.port:8080}") private int port; @Bean @ConditionalOnProperty(name = "server.http.enable") - public ServletWebServerFactory servletContainer() { - TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory(); - tomcat.addAdditionalTomcatConnectors(getHttpConnector()); - return tomcat; + public WebServerFactoryCustomizer httpConnectorCustomizer() { + return factory -> factory.addAdditionalConnectors(getHttpConnector()); } private Connector getHttpConnector() { From c86c17567cd3ae22733a85d9722b1719efc7e7c0 Mon Sep 17 00:00:00 2001 From: Anders Lindh Olsson Date: Tue, 14 Apr 2026 13:01:14 +0200 Subject: [PATCH 05/10] fix(test): use spring-boot-starter-security-test --- pom.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 133914d5..a939769c 100644 --- a/pom.xml +++ b/pom.xml @@ -128,8 +128,9 @@ unboundid-ldapsdk - org.springframework.security - spring-security-test + org.springframework.boot + spring-boot-starter-security-test + test From f512cc35e5b9d09aaaf18fc67d26c2cbf6be9420 Mon Sep 17 00:00:00 2001 From: Anders Lindh Olsson Date: Tue, 14 Apr 2026 13:01:42 +0200 Subject: [PATCH 06/10] fix(test): upgrade springdoc to 3.0.3, add webmvc-test starter springdoc 2.x is incompatible with Spring Framework 7. 3.0.3 is the first release tested against SB 4.0.5. Add spring-boot-starter-webmvc-test which Spring Boot 4 requires for @WebMvcTest and @AutoConfigureMockMvc to resolve (test slice module split). --- pom.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a939769c..6b5dd7c9 100644 --- a/pom.xml +++ b/pom.xml @@ -159,7 +159,12 @@ org.springdoc springdoc-openapi-starter-webmvc-ui - 2.8.5 + 3.0.3 + + + org.springframework.boot + spring-boot-starter-webmvc-test + test org.testcontainers From 43ae68af9cf50c0398c3fafb07159ed7c399901b Mon Sep 17 00:00:00 2001 From: Anders Lindh Olsson Date: Tue, 14 Apr 2026 13:01:48 +0200 Subject: [PATCH 07/10] fix(config): remove deprecated/removed properties Remove security.require-ssl (dropped in SB4) and spring.http.log-request-details (moved) from all property files. --- src/main/resources/application.properties | 6 ++++-- src/test/resources/application_test.properties | 2 -- src/test/resources/application_test_multi.properties | 2 -- src/test/resources/performance_application.properties | 3 --- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index e30952fd..1002887a 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,4 +1,8 @@ ################## ChannelFinder Server #################### +# Both spring-boot-starter-webmvc (Tomcat) and spring-boot-starter-webflux (Netty/reactor) +# are on the classpath; force servlet mode so Tomcat always wins. +spring.main.web-application-type=servlet + # ChannelFinder https port server.port=8443 @@ -11,8 +15,6 @@ server.ssl.key-store=classpath:keystore/newcf.p12 server.ssl.key-store-password=password server.ssl.key-alias=cf -security.require-ssl=false - server.compression.enabled=true # opt in to content types server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain,application/javascript,text/css diff --git a/src/test/resources/application_test.properties b/src/test/resources/application_test.properties index ec31e9b6..2af67656 100644 --- a/src/test/resources/application_test.properties +++ b/src/test/resources/application_test.properties @@ -10,8 +10,6 @@ server.ssl.key-store=classpath:keystore/cf.p12 server.ssl.key-store-password=password server.ssl.key-alias=cf -security.require-ssl=true - server.compression.enabled=true # opt in to content types server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain,application/javascript,text/css diff --git a/src/test/resources/application_test_multi.properties b/src/test/resources/application_test_multi.properties index 91c2ed0e..ab06d796 100644 --- a/src/test/resources/application_test_multi.properties +++ b/src/test/resources/application_test_multi.properties @@ -10,8 +10,6 @@ server.ssl.key-store=classpath:keystore/cf.p12 server.ssl.key-store-password=password server.ssl.key-alias=cf -security.require-ssl=true - server.compression.enabled=true # opt in to content types server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain,application/javascript,text/css diff --git a/src/test/resources/performance_application.properties b/src/test/resources/performance_application.properties index 121d9567..2f9b55ff 100644 --- a/src/test/resources/performance_application.properties +++ b/src/test/resources/performance_application.properties @@ -11,12 +11,9 @@ server.ssl.key-store=classpath:keystore/newcf.p12 server.ssl.key-store-password=password server.ssl.key-alias=cf -security.require-ssl=true - logging.level.=ERROR logging.o.p.channelfinder.ChannelRepository=ERROR logging.level.org.springframework.web=ERROR -spring.http.log-request-details=true ############## LDAP - External ############## ldap.enabled = false From 89c809054d48be350db526072151778710dfd636 Mon Sep 17 00:00:00 2001 From: Anders Lindh Olsson Date: Tue, 14 Apr 2026 13:02:05 +0200 Subject: [PATCH 08/10] refactor(jackson): migrate to Jackson 3 Replace com.fasterxml.jackson.* with tools.jackson.* in non-ES code (InfoService, ArchiverService, AAChannelProcessor, ChannelProcessor, PopulateDBConfiguration). Use JsonMapper builder pattern for ObjectMapper construction. Catch JacksonException instead of JsonProcessingException. ElasticConfig and the three repositories retain Jackson 2 ObjectMapper because elasticsearch-java 8.x JacksonJsonpMapper requires Jackson 2; add comments marking these for migration when ES 9 lands. Update tests: fix AAChannelProcessorTest for Jackson 3 alphabetical field ordering; update ArchiverServiceTest for renamed exception type. --- .../configuration/AAChannelProcessor.java | 6 +++--- .../configuration/ChannelProcessor.java | 4 ++-- .../configuration/ElasticConfig.java | 1 + .../PopulateDBConfiguration.java | 4 ++-- .../repository/ChannelRepository.java | 2 ++ .../repository/PropertyRepository.java | 2 ++ .../repository/TagRepository.java | 2 ++ .../channelfinder/service/InfoService.java | 11 +++++----- .../service/external/ArchiverService.java | 2 +- .../docker/ChannelFinderChannelsIT.java | 2 +- .../docker/ChannelFinderPropertiesIT.java | 2 +- .../docker/ChannelFinderTagsIT.java | 2 +- .../phoebus/channelfinder/docker/ITUtil.java | 2 +- .../channelfinder/docker/ITUtilChannels.java | 6 +++--- .../docker/ITUtilProperties.java | 6 +++--- .../channelfinder/docker/ITUtilTags.java | 6 +++--- .../ChannelProcessorServiceTest.java | 4 ++-- .../processors/aa/AAChannelProcessorIT.java | 8 ++++---- .../aa/AAChannelProcessorMultiArchiverIT.java | 4 ++-- .../aa/AAChannelProcessorMultiIT.java | 4 ++-- .../aa/AAChannelProcessorNoDefaultIT.java | 4 ++-- .../aa/AAChannelProcessorNoPauseIT.java | 4 ++-- .../aa/AAChannelProcessorStatusPauseIT.java | 4 ++-- .../aa/AAChannelProcessorTagPauseIT.java | 4 ++-- .../processors/aa/AAChannelProcessorTest.java | 8 ++++---- .../service/external/ArchiverServiceTest.java | 20 +++++++++---------- 26 files changed, 66 insertions(+), 58 deletions(-) diff --git a/src/main/java/org/phoebus/channelfinder/configuration/AAChannelProcessor.java b/src/main/java/org/phoebus/channelfinder/configuration/AAChannelProcessor.java index 7625d8bd..3da84200 100644 --- a/src/main/java/org/phoebus/channelfinder/configuration/AAChannelProcessor.java +++ b/src/main/java/org/phoebus/channelfinder/configuration/AAChannelProcessor.java @@ -1,6 +1,5 @@ package org.phoebus.channelfinder.configuration; -import com.fasterxml.jackson.core.JsonProcessingException; import java.util.ArrayList; import java.util.Arrays; import java.util.EnumMap; @@ -23,6 +22,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Configuration; +import tools.jackson.core.JacksonException; /** * A post processor which uses the channel property *archive* to add pv's to the archiver appliance @@ -98,10 +98,10 @@ public ChannelProcessorInfo processorInfo() { * * @param channels List of channels * @return Return number of channels processed - * @throws JsonProcessingException If processing archiver responses fail. + * @throws JacksonException If processing archiver responses fail. */ @Override - public long process(List channels) throws JsonProcessingException { + public long process(List channels) throws JacksonException { if (channels.isEmpty()) { return 0; } diff --git a/src/main/java/org/phoebus/channelfinder/configuration/ChannelProcessor.java b/src/main/java/org/phoebus/channelfinder/configuration/ChannelProcessor.java index c5519ca2..1f1e32b7 100644 --- a/src/main/java/org/phoebus/channelfinder/configuration/ChannelProcessor.java +++ b/src/main/java/org/phoebus/channelfinder/configuration/ChannelProcessor.java @@ -1,9 +1,9 @@ package org.phoebus.channelfinder.configuration; -import com.fasterxml.jackson.core.JsonProcessingException; import java.util.List; import org.phoebus.channelfinder.entity.Channel; import org.phoebus.channelfinder.service.model.archiver.ChannelProcessorInfo; +import tools.jackson.core.JacksonException; public interface ChannelProcessor { @@ -13,5 +13,5 @@ public interface ChannelProcessor { ChannelProcessorInfo processorInfo(); - long process(List channels) throws JsonProcessingException; + long process(List channels) throws JacksonException; } diff --git a/src/main/java/org/phoebus/channelfinder/configuration/ElasticConfig.java b/src/main/java/org/phoebus/channelfinder/configuration/ElasticConfig.java index a7fc37e1..761f7dca 100644 --- a/src/main/java/org/phoebus/channelfinder/configuration/ElasticConfig.java +++ b/src/main/java/org/phoebus/channelfinder/configuration/ElasticConfig.java @@ -23,6 +23,7 @@ import co.elastic.clients.transport.ElasticsearchTransport; import co.elastic.clients.transport.endpoints.BooleanResponse; import co.elastic.clients.transport.rest_client.RestClientTransport; +// Jackson 2 required by elasticsearch-java 8.x JacksonJsonpMapper — migrate with ES 9 import com.fasterxml.jackson.databind.ObjectMapper; import jakarta.servlet.ServletContextEvent; import jakarta.servlet.ServletContextListener; diff --git a/src/main/java/org/phoebus/channelfinder/configuration/PopulateDBConfiguration.java b/src/main/java/org/phoebus/channelfinder/configuration/PopulateDBConfiguration.java index 17dc96fa..05375349 100644 --- a/src/main/java/org/phoebus/channelfinder/configuration/PopulateDBConfiguration.java +++ b/src/main/java/org/phoebus/channelfinder/configuration/PopulateDBConfiguration.java @@ -7,8 +7,6 @@ import co.elastic.clients.elasticsearch.core.IndexRequest; import co.elastic.clients.elasticsearch.core.bulk.BulkResponseItem; import co.elastic.clients.elasticsearch.core.bulk.IndexOperation; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; import java.io.InputStream; import java.net.URI; @@ -33,6 +31,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Configuration; +import tools.jackson.core.type.TypeReference; +import tools.jackson.databind.ObjectMapper; /** * An class for creating the example database. diff --git a/src/main/java/org/phoebus/channelfinder/repository/ChannelRepository.java b/src/main/java/org/phoebus/channelfinder/repository/ChannelRepository.java index b3b012b0..29689d2a 100644 --- a/src/main/java/org/phoebus/channelfinder/repository/ChannelRepository.java +++ b/src/main/java/org/phoebus/channelfinder/repository/ChannelRepository.java @@ -67,6 +67,8 @@ import org.springframework.util.MultiValueMap; import org.springframework.web.server.ResponseStatusException; +// Jackson 2 required by elasticsearch-java 8.x JacksonJsonpMapper — migrate with ES 9 + @Repository @Configuration public class ChannelRepository implements CrudRepository { diff --git a/src/main/java/org/phoebus/channelfinder/repository/PropertyRepository.java b/src/main/java/org/phoebus/channelfinder/repository/PropertyRepository.java index 696616d7..8c1792c7 100644 --- a/src/main/java/org/phoebus/channelfinder/repository/PropertyRepository.java +++ b/src/main/java/org/phoebus/channelfinder/repository/PropertyRepository.java @@ -46,6 +46,8 @@ import org.springframework.util.MultiValueMap; import org.springframework.web.server.ResponseStatusException; +// Jackson 2 required by elasticsearch-java 8.x JacksonJsonpMapper — migrate with ES 9 + @Repository @Configuration public class PropertyRepository implements CrudRepository { diff --git a/src/main/java/org/phoebus/channelfinder/repository/TagRepository.java b/src/main/java/org/phoebus/channelfinder/repository/TagRepository.java index 37a30497..da9ae87a 100644 --- a/src/main/java/org/phoebus/channelfinder/repository/TagRepository.java +++ b/src/main/java/org/phoebus/channelfinder/repository/TagRepository.java @@ -47,6 +47,8 @@ import org.springframework.util.MultiValueMap; import org.springframework.web.server.ResponseStatusException; +// Jackson 2 required by elasticsearch-java 8.x JacksonJsonpMapper — migrate with ES 9 + @Repository @Configuration public class TagRepository implements CrudRepository { diff --git a/src/main/java/org/phoebus/channelfinder/service/InfoService.java b/src/main/java/org/phoebus/channelfinder/service/InfoService.java index 17b8cc3a..9bfb25da 100644 --- a/src/main/java/org/phoebus/channelfinder/service/InfoService.java +++ b/src/main/java/org/phoebus/channelfinder/service/InfoService.java @@ -1,8 +1,5 @@ package org.phoebus.channelfinder.service; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; import java.io.IOException; import java.util.LinkedHashMap; import java.util.Map; @@ -11,6 +8,10 @@ import org.phoebus.channelfinder.configuration.ElasticConfig; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.SerializationFeature; +import tools.jackson.databind.json.JsonMapper; @Service public class InfoService { @@ -18,7 +19,7 @@ public class InfoService { private static final Logger logger = Logger.getLogger(InfoService.class.getName()); private static final ObjectMapper objectMapper = - new ObjectMapper().enable(SerializationFeature.INDENT_OUTPUT); + JsonMapper.builder().enable(SerializationFeature.INDENT_OUTPUT).build(); private final ElasticConfig esService; @@ -50,7 +51,7 @@ public String info() { try { return objectMapper.writeValueAsString(cfServiceInfo); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { logger.log(Level.WARNING, "Failed to serialize ChannelFinder service info", e); return "Failed to gather ChannelFinder service info"; } diff --git a/src/main/java/org/phoebus/channelfinder/service/external/ArchiverService.java b/src/main/java/org/phoebus/channelfinder/service/external/ArchiverService.java index c6deda94..2da37b69 100644 --- a/src/main/java/org/phoebus/channelfinder/service/external/ArchiverService.java +++ b/src/main/java/org/phoebus/channelfinder/service/external/ArchiverService.java @@ -1,6 +1,5 @@ package org.phoebus.channelfinder.service.external; -import com.fasterxml.jackson.databind.ObjectMapper; import java.net.URI; import java.util.ArrayList; import java.util.List; @@ -24,6 +23,7 @@ import org.springframework.stereotype.Component; import org.springframework.web.client.RestClient; import org.springframework.web.util.UriComponentsBuilder; +import tools.jackson.databind.ObjectMapper; @Component @ConditionalOnProperty(name = "aa.enabled", havingValue = "true") diff --git a/src/test/java/org/phoebus/channelfinder/docker/ChannelFinderChannelsIT.java b/src/test/java/org/phoebus/channelfinder/docker/ChannelFinderChannelsIT.java index 9b5c1c94..829ae555 100644 --- a/src/test/java/org/phoebus/channelfinder/docker/ChannelFinderChannelsIT.java +++ b/src/test/java/org/phoebus/channelfinder/docker/ChannelFinderChannelsIT.java @@ -21,7 +21,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.fail; -import com.fasterxml.jackson.databind.ObjectMapper; import java.net.HttpURLConnection; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; @@ -33,6 +32,7 @@ import org.testcontainers.containers.ComposeContainer; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; +import tools.jackson.databind.ObjectMapper; /** * Integration tests for ChannelFinder and Elasticsearch with focus on usage of {@link diff --git a/src/test/java/org/phoebus/channelfinder/docker/ChannelFinderPropertiesIT.java b/src/test/java/org/phoebus/channelfinder/docker/ChannelFinderPropertiesIT.java index 26f2c016..3382f733 100644 --- a/src/test/java/org/phoebus/channelfinder/docker/ChannelFinderPropertiesIT.java +++ b/src/test/java/org/phoebus/channelfinder/docker/ChannelFinderPropertiesIT.java @@ -21,7 +21,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.fail; -import com.fasterxml.jackson.databind.ObjectMapper; import java.net.HttpURLConnection; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; @@ -34,6 +33,7 @@ import org.testcontainers.containers.ComposeContainer; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; +import tools.jackson.databind.ObjectMapper; /** * Integration tests for ChannelFinder and Elasticsearch with focus on usage of {@link diff --git a/src/test/java/org/phoebus/channelfinder/docker/ChannelFinderTagsIT.java b/src/test/java/org/phoebus/channelfinder/docker/ChannelFinderTagsIT.java index 7bfc6abf..6ce35f82 100644 --- a/src/test/java/org/phoebus/channelfinder/docker/ChannelFinderTagsIT.java +++ b/src/test/java/org/phoebus/channelfinder/docker/ChannelFinderTagsIT.java @@ -21,7 +21,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.fail; -import com.fasterxml.jackson.databind.ObjectMapper; import java.net.HttpURLConnection; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; @@ -34,6 +33,7 @@ import org.testcontainers.containers.ComposeContainer; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; +import tools.jackson.databind.ObjectMapper; /** * Integration tests for ChannelFinder and Elasticsearch with focus on usage of {@link diff --git a/src/test/java/org/phoebus/channelfinder/docker/ITUtil.java b/src/test/java/org/phoebus/channelfinder/docker/ITUtil.java index 0245484e..a99e417b 100644 --- a/src/test/java/org/phoebus/channelfinder/docker/ITUtil.java +++ b/src/test/java/org/phoebus/channelfinder/docker/ITUtil.java @@ -21,7 +21,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; -import com.fasterxml.jackson.databind.ObjectMapper; import com.github.dockerjava.api.DockerClient; import java.io.File; import java.io.IOException; @@ -39,6 +38,7 @@ import org.testcontainers.containers.ContainerState; import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.shaded.org.apache.commons.lang3.StringUtils; +import tools.jackson.databind.ObjectMapper; /** * Utility class to help (Docker) integration tests for ChannelFinder and Elasticsearch with focus diff --git a/src/test/java/org/phoebus/channelfinder/docker/ITUtilChannels.java b/src/test/java/org/phoebus/channelfinder/docker/ITUtilChannels.java index 5b8387a8..26a86de8 100644 --- a/src/test/java/org/phoebus/channelfinder/docker/ITUtilChannels.java +++ b/src/test/java/org/phoebus/channelfinder/docker/ITUtilChannels.java @@ -24,12 +24,12 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; -import com.fasterxml.jackson.core.JsonProcessingException; import java.net.HttpURLConnection; import org.phoebus.channelfinder.docker.ITUtil.AuthorizationChoice; import org.phoebus.channelfinder.docker.ITUtil.EndpointChoice; import org.phoebus.channelfinder.docker.ITUtil.MethodChoice; import org.phoebus.channelfinder.entity.Channel; +import tools.jackson.core.JacksonException; /** * Utility class to help (Docker) integration tests for ChannelFinder and Elasticsearch with focus @@ -83,7 +83,7 @@ private ITUtilChannels() { static String object2Json(Channel value) { try { return ITUtil.MAPPER.writeValueAsString(value); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { fail(); } return null; @@ -98,7 +98,7 @@ static String object2Json(Channel value) { static String object2Json(Channel[] value) { try { return ITUtil.MAPPER.writeValueAsString(value); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { fail(); } return null; diff --git a/src/test/java/org/phoebus/channelfinder/docker/ITUtilProperties.java b/src/test/java/org/phoebus/channelfinder/docker/ITUtilProperties.java index b2f509d0..989451c6 100644 --- a/src/test/java/org/phoebus/channelfinder/docker/ITUtilProperties.java +++ b/src/test/java/org/phoebus/channelfinder/docker/ITUtilProperties.java @@ -24,12 +24,12 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; -import com.fasterxml.jackson.core.JsonProcessingException; import java.net.HttpURLConnection; import org.phoebus.channelfinder.docker.ITUtil.AuthorizationChoice; import org.phoebus.channelfinder.docker.ITUtil.EndpointChoice; import org.phoebus.channelfinder.docker.ITUtil.MethodChoice; import org.phoebus.channelfinder.entity.Property; +import tools.jackson.core.JacksonException; /** * Utility class to help (Docker) integration tests for ChannelFinder and Elasticsearch with focus @@ -89,7 +89,7 @@ private ITUtilProperties() { static String object2Json(Property value) { try { return ITUtil.MAPPER.writeValueAsString(value); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { fail(); } return null; @@ -104,7 +104,7 @@ static String object2Json(Property value) { static String object2Json(Property[] value) { try { return ITUtil.MAPPER.writeValueAsString(value); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { fail(); } return null; diff --git a/src/test/java/org/phoebus/channelfinder/docker/ITUtilTags.java b/src/test/java/org/phoebus/channelfinder/docker/ITUtilTags.java index 64fa5e83..401ccfdb 100644 --- a/src/test/java/org/phoebus/channelfinder/docker/ITUtilTags.java +++ b/src/test/java/org/phoebus/channelfinder/docker/ITUtilTags.java @@ -24,12 +24,12 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; -import com.fasterxml.jackson.core.JsonProcessingException; import java.net.HttpURLConnection; import org.phoebus.channelfinder.docker.ITUtil.AuthorizationChoice; import org.phoebus.channelfinder.docker.ITUtil.EndpointChoice; import org.phoebus.channelfinder.docker.ITUtil.MethodChoice; import org.phoebus.channelfinder.entity.Tag; +import tools.jackson.core.JacksonException; /** * Utility class to help (Docker) integration tests for ChannelFinder and Elasticsearch with focus @@ -87,7 +87,7 @@ private ITUtilTags() { static String object2Json(Tag value) { try { return ITUtil.MAPPER.writeValueAsString(value); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { fail(); } return null; @@ -102,7 +102,7 @@ static String object2Json(Tag value) { static String object2Json(Tag[] value) { try { return ITUtil.MAPPER.writeValueAsString(value); - } catch (JsonProcessingException e) { + } catch (JacksonException e) { fail(); } return null; diff --git a/src/test/java/org/phoebus/channelfinder/processors/ChannelProcessorServiceTest.java b/src/test/java/org/phoebus/channelfinder/processors/ChannelProcessorServiceTest.java index e3601542..0193c7c8 100644 --- a/src/test/java/org/phoebus/channelfinder/processors/ChannelProcessorServiceTest.java +++ b/src/test/java/org/phoebus/channelfinder/processors/ChannelProcessorServiceTest.java @@ -1,6 +1,5 @@ package org.phoebus.channelfinder.processors; -import com.fasterxml.jackson.core.JsonProcessingException; import java.util.Collections; import java.util.List; import java.util.Map; @@ -17,6 +16,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.TestPropertySource; +import tools.jackson.core.JacksonException; @SpringBootTest() @TestPropertySource(value = "classpath:application_test.properties") @@ -54,7 +54,7 @@ public ChannelProcessorInfo processorInfo() { } @Override - public long process(List channels) throws JsonProcessingException { + public long process(List channels) throws JacksonException { processed.set(true); return channels.size(); } diff --git a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorIT.java b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorIT.java index 6e26515e..3b70af37 100644 --- a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorIT.java +++ b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorIT.java @@ -8,7 +8,6 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import com.fasterxml.jackson.core.JsonProcessingException; import java.util.List; import java.util.Map; import java.util.stream.Stream; @@ -31,6 +30,7 @@ import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.bean.override.mockito.MockitoBean; +import tools.jackson.core.JacksonException; @WebMvcTest(AAChannelProcessor.class) @ExtendWith(MockitoExtension.class) @@ -99,7 +99,7 @@ public static void paramableAAChannelProcessorTest( List channels, String archiveStatus, String archiverEndpoint) - throws JsonProcessingException { + throws JacksonException { // Mock getAAPolicies when(archiverService.getAAPolicies(anyString())).thenReturn(List.of("policy")); @@ -156,7 +156,7 @@ private static ArchiveAction getActionFromEndpoint(String endpoint) { } @Test - void testProcessNoPVs() throws JsonProcessingException { + void testProcessNoPVs() throws JacksonException { aaChannelProcessor.process(List.of()); // verify interactions are minimal or none if empty @@ -166,7 +166,7 @@ void testProcessNoPVs() throws JsonProcessingException { @ParameterizedTest @MethodSource("processSource") void testProcessNotArchivedActive(Channel channel, String archiveStatus, String archiverEndpoint) - throws JsonProcessingException { + throws JacksonException { paramableAAChannelProcessorTest( archiverService, aaChannelProcessor, List.of(channel), archiveStatus, archiverEndpoint); } diff --git a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorMultiArchiverIT.java b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorMultiArchiverIT.java index 56a2b119..efe3dad4 100644 --- a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorMultiArchiverIT.java +++ b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorMultiArchiverIT.java @@ -9,7 +9,6 @@ import static org.phoebus.channelfinder.processors.aa.AAChannelProcessorIT.archiveProperty; import static org.phoebus.channelfinder.processors.aa.AAChannelProcessorIT.inactiveProperty; -import com.fasterxml.jackson.core.JsonProcessingException; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -26,6 +25,7 @@ import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.bean.override.mockito.MockitoBean; +import tools.jackson.core.JacksonException; @WebMvcTest(AAChannelProcessor.class) @TestPropertySource(value = "classpath:application_test_multi.properties") @@ -97,7 +97,7 @@ void testProcessMultiArchivers( List channels, Map namesToStatuses, Map> actionsToNames) - throws JsonProcessingException { + throws JacksonException { when(archiverService.getAAPolicies(anyString())).thenReturn(List.of("policy")); // Request to archiver status diff --git a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorMultiIT.java b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorMultiIT.java index 2a46c9b7..dcb69fdb 100644 --- a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorMultiIT.java +++ b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorMultiIT.java @@ -10,7 +10,6 @@ import static org.phoebus.channelfinder.processors.aa.AAChannelProcessorIT.archiveProperty; import static org.phoebus.channelfinder.processors.aa.AAChannelProcessorIT.inactiveProperty; -import com.fasterxml.jackson.core.JsonProcessingException; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -29,6 +28,7 @@ import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.bean.override.mockito.MockitoBean; +import tools.jackson.core.JacksonException; @WebMvcTest(AAChannelProcessor.class) @TestPropertySource(value = "classpath:application_aa_proc_test.properties") @@ -101,7 +101,7 @@ void testProcessMulti( Map namesToStatuses, Map> actionsToNames, int expectedProcessedChannels) - throws JsonProcessingException { + throws JacksonException { // Mock getAAPolicies when(archiverService.getAAPolicies(anyString())).thenReturn(List.of("policy")); diff --git a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorNoDefaultIT.java b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorNoDefaultIT.java index 3fec1608..075c27a8 100644 --- a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorNoDefaultIT.java +++ b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorNoDefaultIT.java @@ -4,7 +4,6 @@ import static org.phoebus.channelfinder.processors.aa.AAChannelProcessorIT.archiveProperty; import static org.phoebus.channelfinder.processors.aa.AAChannelProcessorIT.paramableAAChannelProcessorTest; -import com.fasterxml.jackson.core.JsonProcessingException; import java.util.List; import java.util.stream.Stream; import org.junit.jupiter.params.ParameterizedTest; @@ -18,6 +17,7 @@ import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.bean.override.mockito.MockitoBean; +import tools.jackson.core.JacksonException; @WebMvcTest(AAChannelProcessor.class) @TestPropertySource( @@ -54,7 +54,7 @@ private static Stream processNoPauseSource() { @MethodSource("processNoPauseSource") void testProcessNotArchivedActive( Channel channel, String archiveStatus, String archiverEndpoint, String submissionBody) - throws JsonProcessingException { + throws JacksonException { paramableAAChannelProcessorTest( archiverService, aaChannelProcessor, List.of(channel), archiveStatus, archiverEndpoint); } diff --git a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorNoPauseIT.java b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorNoPauseIT.java index ec0f32c6..50fb758d 100644 --- a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorNoPauseIT.java +++ b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorNoPauseIT.java @@ -4,7 +4,6 @@ import static org.phoebus.channelfinder.processors.aa.AAChannelProcessorIT.inactiveProperty; import static org.phoebus.channelfinder.processors.aa.AAChannelProcessorIT.paramableAAChannelProcessorTest; -import com.fasterxml.jackson.core.JsonProcessingException; import java.util.List; import java.util.stream.Stream; import org.junit.jupiter.params.ParameterizedTest; @@ -17,6 +16,7 @@ import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.bean.override.mockito.MockitoBean; +import tools.jackson.core.JacksonException; @WebMvcTest(AAChannelProcessor.class) @TestPropertySource( @@ -47,7 +47,7 @@ private static Stream processNoPauseSource() { @MethodSource("processNoPauseSource") void testProcessNotArchivedActive( Channel channel, String archiveStatus, String archiverEndpoint, String submissionBody) - throws JsonProcessingException { + throws JacksonException { paramableAAChannelProcessorTest( archiverService, aaChannelProcessor, List.of(channel), archiveStatus, archiverEndpoint); } diff --git a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorStatusPauseIT.java b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorStatusPauseIT.java index deda7c26..a5c649bd 100644 --- a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorStatusPauseIT.java +++ b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorStatusPauseIT.java @@ -4,7 +4,6 @@ import static org.phoebus.channelfinder.processors.aa.AAChannelProcessorIT.inactiveProperty; import static org.phoebus.channelfinder.processors.aa.AAChannelProcessorIT.paramableAAChannelProcessorTest; -import com.fasterxml.jackson.core.JsonProcessingException; import java.util.List; import java.util.stream.Stream; import org.junit.jupiter.params.ParameterizedTest; @@ -17,6 +16,7 @@ import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.bean.override.mockito.MockitoBean; +import tools.jackson.core.JacksonException; @WebMvcTest(AAChannelProcessor.class) @TestPropertySource( @@ -47,7 +47,7 @@ private static Stream processNoPauseSource() { @MethodSource("processNoPauseSource") void testProcessNotArchivedActive( Channel channel, String archiveStatus, String archiverEndpoint, String submissionBody) - throws JsonProcessingException { + throws JacksonException { paramableAAChannelProcessorTest( archiverService, aaChannelProcessor, List.of(channel), archiveStatus, archiverEndpoint); } diff --git a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorTagPauseIT.java b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorTagPauseIT.java index 310f8047..bde2af37 100644 --- a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorTagPauseIT.java +++ b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorTagPauseIT.java @@ -4,7 +4,6 @@ import static org.phoebus.channelfinder.processors.aa.AAChannelProcessorIT.inactiveProperty; import static org.phoebus.channelfinder.processors.aa.AAChannelProcessorIT.paramableAAChannelProcessorTest; -import com.fasterxml.jackson.core.JsonProcessingException; import java.util.List; import java.util.stream.Stream; import org.junit.jupiter.params.ParameterizedTest; @@ -17,6 +16,7 @@ import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.bean.override.mockito.MockitoBean; +import tools.jackson.core.JacksonException; @WebMvcTest(AAChannelProcessor.class) @TestPropertySource( @@ -51,7 +51,7 @@ private static Stream processNoPauseSource() { @MethodSource("processNoPauseSource") void testProcessNotArchivedActive( Channel channel, String archiveStatus, String archiverEndpoint, String submissionBody) - throws JsonProcessingException { + throws JacksonException { paramableAAChannelProcessorTest( archiverService, aaChannelProcessor, List.of(channel), archiveStatus, archiverEndpoint); } diff --git a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorTest.java b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorTest.java index f3508553..b2a9ec70 100644 --- a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorTest.java +++ b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorTest.java @@ -1,7 +1,5 @@ package org.phoebus.channelfinder.processors.aa; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -12,6 +10,8 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.phoebus.channelfinder.service.model.archiver.aa.ArchivePVOptions; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.ObjectMapper; class AAChannelProcessorTest { @@ -101,7 +101,7 @@ void archivePolicyParsing() { } @Test - void archivePVJson() throws JsonProcessingException { + void archivePVJson() throws JacksonException { ArchivePVOptions ar1 = new ArchivePVOptions(); ar1.setPv("sim://testing1"); ar1.setSamplingParameters("monitor@1.0", new ArrayList<>()); @@ -134,7 +134,7 @@ void archivePVJson() throws JsonProcessingException { ar4.setSamplingParameters("Fast", testPolicyList); str = objectMapper.writeValueAsString(List.of(ar4)); - expectedString = "[{\"pv\":\"sim://testing4\",\"policy\":\"Fast\"}]"; + expectedString = "[{\"policy\":\"Fast\",\"pv\":\"sim://testing4\"}]"; Assertions.assertEquals(str, expectedString); // Invalid policy diff --git a/src/test/java/org/phoebus/channelfinder/service/external/ArchiverServiceTest.java b/src/test/java/org/phoebus/channelfinder/service/external/ArchiverServiceTest.java index 68c2efc4..81d60512 100644 --- a/src/test/java/org/phoebus/channelfinder/service/external/ArchiverServiceTest.java +++ b/src/test/java/org/phoebus/channelfinder/service/external/ArchiverServiceTest.java @@ -8,8 +8,6 @@ import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo; import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; import java.util.EnumMap; import java.util.List; import java.util.Map; @@ -29,6 +27,8 @@ import org.springframework.test.util.ReflectionTestUtils; import org.springframework.test.web.client.MockRestServiceServer; import org.springframework.web.client.RestClient; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.ObjectMapper; @ExtendWith(MockitoExtension.class) class ArchiverServiceTest { @@ -56,7 +56,7 @@ void tearDown() { @ParameterizedTest @ValueSource(strings = {"other-archiver", "test-archiver"}) - void testGetStatuses(String archiverAlias) throws JsonProcessingException { + void testGetStatuses(String archiverAlias) throws JacksonException { Map pvs = Map.of("pv1", new ArchivePVOptions()); @@ -105,7 +105,7 @@ void testGetStatusesInvalidResponse() { } @Test - void testSubmitBasicAction() throws JsonProcessingException { + void testSubmitBasicAction() throws JacksonException { List pvs = List.of("pv1"); List> expectedResponse = List.of(Map.of("pv", "pv1", "status", "ok")); @@ -125,7 +125,7 @@ void testSubmitBasicAction() throws JsonProcessingException { } @Test - void testSubmitBasicActionStatusNotOk() throws JsonProcessingException { + void testSubmitBasicActionStatusNotOk() throws JacksonException { List pvs = List.of("pv1"); List> expectedResponse = List.of(Map.of("pv", "pv1", "status", "failed")); @@ -143,7 +143,7 @@ void testSubmitBasicActionStatusNotOk() throws JsonProcessingException { } @Test - void testSubmitBasicActionPartialFailure() throws JsonProcessingException { + void testSubmitBasicActionPartialFailure() throws JacksonException { List pvs = List.of("pv1", "pv2"); List> expectedResponse = @@ -179,7 +179,7 @@ void testSubmitBasicActionInvalidResponse() { @ParameterizedTest @EnumSource(ArchiveAction.class) - void testConfigureAA(ArchiveAction action) throws JsonProcessingException { + void testConfigureAA(ArchiveAction action) throws JacksonException { ArchivePVOptions options = new ArchivePVOptions(); options.setPv("pv1"); @@ -217,7 +217,7 @@ void testConfigureAA(ArchiveAction action) throws JsonProcessingException { } @Test - void testConfigureAAStatusNotOk() throws JsonProcessingException { + void testConfigureAAStatusNotOk() throws JacksonException { ArchivePVOptions options = new ArchivePVOptions(); options.setPv("pv1"); @@ -263,7 +263,7 @@ void testConfigureAAInvalidResponse() { } @Test - void testGetAAPolicies() throws JsonProcessingException { + void testGetAAPolicies() throws JacksonException { Map policies = Map.of("policy1", "desc1", "policy2", "desc2"); @@ -333,7 +333,7 @@ void testSubmitActionWithRealResponsePause() { } @Test - void testSubmitActionWithRealResponseArchive() throws JsonProcessingException { + void testSubmitActionWithRealResponseArchive() throws JacksonException { List pvs = List.of("PV1"); ArchivePVOptions options = new ArchivePVOptions(); From fc0aa5ee234d9758592ea9b4972164cb9b8d8709 Mon Sep 17 00:00:00 2001 From: Anders Lindh Olsson Date: Tue, 14 Apr 2026 13:02:22 +0200 Subject: [PATCH 09/10] fix(test): update test slice imports for SB4 module split Spring Boot 4 moved @WebMvcTest and @AutoConfigureMockMvc from org.springframework.boot.test.autoconfigure.web.servlet.* to org.springframework.boot.webmvc.test.autoconfigure.* as part of the web module modularisation. Update 29 test files. --- src/test/java/org/phoebus/channelfinder/AuthorizationIT.java | 2 +- .../java/org/phoebus/channelfinder/ChannelControllerIT.java | 2 +- .../java/org/phoebus/channelfinder/ChannelRepositoryIT.java | 2 +- .../org/phoebus/channelfinder/ChannelRepositorySearchIT.java | 2 +- .../org/phoebus/channelfinder/ChannelScrollControllerIT.java | 2 +- .../phoebus/channelfinder/ChannelScrollControllerSearchIT.java | 2 +- src/test/java/org/phoebus/channelfinder/MetricsServiceIT.java | 2 +- .../java/org/phoebus/channelfinder/PropertyControllerIT.java | 2 +- .../java/org/phoebus/channelfinder/PropertyRepositoryIT.java | 2 +- src/test/java/org/phoebus/channelfinder/TagControllerIT.java | 2 +- src/test/java/org/phoebus/channelfinder/TagRepositoryIT.java | 2 +- .../java/org/phoebus/channelfinder/epics/EpicsRPCRequestIT.java | 2 +- .../phoebus/channelfinder/performance/ExistsPerformanceIT.java | 2 +- .../channelfinder/performance/PopulateDBConfigurationIT.java | 2 +- .../channelfinder/processors/ChannelProcessorControllerIT.java | 2 +- .../channelfinder/processors/aa/AAChannelProcessorIT.java | 2 +- .../processors/aa/AAChannelProcessorMultiArchiverIT.java | 2 +- .../channelfinder/processors/aa/AAChannelProcessorMultiIT.java | 2 +- .../processors/aa/AAChannelProcessorNoDefaultIT.java | 2 +- .../processors/aa/AAChannelProcessorNoPauseIT.java | 2 +- .../processors/aa/AAChannelProcessorStatusPauseIT.java | 2 +- .../processors/aa/AAChannelProcessorTagPauseIT.java | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/test/java/org/phoebus/channelfinder/AuthorizationIT.java b/src/test/java/org/phoebus/channelfinder/AuthorizationIT.java index e43ae8ff..515e6923 100644 --- a/src/test/java/org/phoebus/channelfinder/AuthorizationIT.java +++ b/src/test/java/org/phoebus/channelfinder/AuthorizationIT.java @@ -8,7 +8,7 @@ import org.phoebus.channelfinder.service.AuthorizationService; import org.phoebus.channelfinder.service.AuthorizationService.ROLES; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.test.context.support.WithMockUser; import org.springframework.test.context.ContextConfiguration; diff --git a/src/test/java/org/phoebus/channelfinder/ChannelControllerIT.java b/src/test/java/org/phoebus/channelfinder/ChannelControllerIT.java index f348626c..71d36c1e 100644 --- a/src/test/java/org/phoebus/channelfinder/ChannelControllerIT.java +++ b/src/test/java/org/phoebus/channelfinder/ChannelControllerIT.java @@ -24,7 +24,7 @@ import org.phoebus.channelfinder.web.v0.api.IChannel; import org.phoebus.channelfinder.web.v0.controller.ChannelController; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; import org.springframework.security.test.context.support.WithMockUser; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; diff --git a/src/test/java/org/phoebus/channelfinder/ChannelRepositoryIT.java b/src/test/java/org/phoebus/channelfinder/ChannelRepositoryIT.java index de1d23c7..aa5d9350 100644 --- a/src/test/java/org/phoebus/channelfinder/ChannelRepositoryIT.java +++ b/src/test/java/org/phoebus/channelfinder/ChannelRepositoryIT.java @@ -24,7 +24,7 @@ import org.phoebus.channelfinder.repository.PropertyRepository; import org.phoebus.channelfinder.repository.TagRepository; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; import org.springframework.util.LinkedMultiValueMap; diff --git a/src/test/java/org/phoebus/channelfinder/ChannelRepositorySearchIT.java b/src/test/java/org/phoebus/channelfinder/ChannelRepositorySearchIT.java index bb4c367a..b0f34e45 100644 --- a/src/test/java/org/phoebus/channelfinder/ChannelRepositorySearchIT.java +++ b/src/test/java/org/phoebus/channelfinder/ChannelRepositorySearchIT.java @@ -25,7 +25,7 @@ import org.phoebus.channelfinder.repository.TagRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; import org.springframework.util.LinkedMultiValueMap; diff --git a/src/test/java/org/phoebus/channelfinder/ChannelScrollControllerIT.java b/src/test/java/org/phoebus/channelfinder/ChannelScrollControllerIT.java index 944513a9..5d682c82 100644 --- a/src/test/java/org/phoebus/channelfinder/ChannelScrollControllerIT.java +++ b/src/test/java/org/phoebus/channelfinder/ChannelScrollControllerIT.java @@ -17,7 +17,7 @@ import org.phoebus.channelfinder.web.v0.api.IChannelScroll; import org.phoebus.channelfinder.web.v0.controller.ChannelScrollController; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; import org.springframework.util.LinkedMultiValueMap; diff --git a/src/test/java/org/phoebus/channelfinder/ChannelScrollControllerSearchIT.java b/src/test/java/org/phoebus/channelfinder/ChannelScrollControllerSearchIT.java index 87bce546..1fd6970e 100644 --- a/src/test/java/org/phoebus/channelfinder/ChannelScrollControllerSearchIT.java +++ b/src/test/java/org/phoebus/channelfinder/ChannelScrollControllerSearchIT.java @@ -17,7 +17,7 @@ import org.phoebus.channelfinder.web.v0.api.IChannelScroll; import org.phoebus.channelfinder.web.v0.controller.ChannelScrollController; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; import org.springframework.util.LinkedMultiValueMap; diff --git a/src/test/java/org/phoebus/channelfinder/MetricsServiceIT.java b/src/test/java/org/phoebus/channelfinder/MetricsServiceIT.java index 3119ca99..5079da41 100644 --- a/src/test/java/org/phoebus/channelfinder/MetricsServiceIT.java +++ b/src/test/java/org/phoebus/channelfinder/MetricsServiceIT.java @@ -20,8 +20,8 @@ import org.phoebus.channelfinder.repository.TagRepository; import org.phoebus.channelfinder.service.MetricsService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; diff --git a/src/test/java/org/phoebus/channelfinder/PropertyControllerIT.java b/src/test/java/org/phoebus/channelfinder/PropertyControllerIT.java index 0d03663e..49f7020a 100644 --- a/src/test/java/org/phoebus/channelfinder/PropertyControllerIT.java +++ b/src/test/java/org/phoebus/channelfinder/PropertyControllerIT.java @@ -25,7 +25,7 @@ import org.phoebus.channelfinder.web.v0.api.IProperty; import org.phoebus.channelfinder.web.v0.controller.PropertyController; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; import org.springframework.security.test.context.support.WithMockUser; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; diff --git a/src/test/java/org/phoebus/channelfinder/PropertyRepositoryIT.java b/src/test/java/org/phoebus/channelfinder/PropertyRepositoryIT.java index 85452d0e..9f82ede2 100644 --- a/src/test/java/org/phoebus/channelfinder/PropertyRepositoryIT.java +++ b/src/test/java/org/phoebus/channelfinder/PropertyRepositoryIT.java @@ -20,7 +20,7 @@ import org.phoebus.channelfinder.repository.ChannelRepository; import org.phoebus.channelfinder.repository.PropertyRepository; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; import org.springframework.util.LinkedMultiValueMap; diff --git a/src/test/java/org/phoebus/channelfinder/TagControllerIT.java b/src/test/java/org/phoebus/channelfinder/TagControllerIT.java index f5d1086a..3d2f833c 100644 --- a/src/test/java/org/phoebus/channelfinder/TagControllerIT.java +++ b/src/test/java/org/phoebus/channelfinder/TagControllerIT.java @@ -25,7 +25,7 @@ import org.phoebus.channelfinder.web.v0.api.ITag; import org.phoebus.channelfinder.web.v0.controller.TagController; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; import org.springframework.security.test.context.support.WithMockUser; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; diff --git a/src/test/java/org/phoebus/channelfinder/TagRepositoryIT.java b/src/test/java/org/phoebus/channelfinder/TagRepositoryIT.java index cf40407e..d5655327 100644 --- a/src/test/java/org/phoebus/channelfinder/TagRepositoryIT.java +++ b/src/test/java/org/phoebus/channelfinder/TagRepositoryIT.java @@ -18,7 +18,7 @@ import org.phoebus.channelfinder.repository.ChannelRepository; import org.phoebus.channelfinder.repository.TagRepository; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; import org.springframework.util.LinkedMultiValueMap; diff --git a/src/test/java/org/phoebus/channelfinder/epics/EpicsRPCRequestIT.java b/src/test/java/org/phoebus/channelfinder/epics/EpicsRPCRequestIT.java index 38a61c65..4cea3488 100644 --- a/src/test/java/org/phoebus/channelfinder/epics/EpicsRPCRequestIT.java +++ b/src/test/java/org/phoebus/channelfinder/epics/EpicsRPCRequestIT.java @@ -24,7 +24,7 @@ import org.phoebus.channelfinder.web.v0.api.IProperty; import org.phoebus.channelfinder.web.v0.api.ITag; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; import org.springframework.security.test.context.support.WithMockUser; import org.springframework.test.context.TestPropertySource; diff --git a/src/test/java/org/phoebus/channelfinder/performance/ExistsPerformanceIT.java b/src/test/java/org/phoebus/channelfinder/performance/ExistsPerformanceIT.java index 48f7240e..3271d44d 100644 --- a/src/test/java/org/phoebus/channelfinder/performance/ExistsPerformanceIT.java +++ b/src/test/java/org/phoebus/channelfinder/performance/ExistsPerformanceIT.java @@ -7,7 +7,7 @@ import org.phoebus.channelfinder.configuration.PopulateDBConfiguration; import org.phoebus.channelfinder.repository.ChannelRepository; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; import org.springframework.test.context.TestPropertySource; /** diff --git a/src/test/java/org/phoebus/channelfinder/performance/PopulateDBConfigurationIT.java b/src/test/java/org/phoebus/channelfinder/performance/PopulateDBConfigurationIT.java index 06a169cd..bb6acace 100644 --- a/src/test/java/org/phoebus/channelfinder/performance/PopulateDBConfigurationIT.java +++ b/src/test/java/org/phoebus/channelfinder/performance/PopulateDBConfigurationIT.java @@ -6,7 +6,7 @@ import org.phoebus.channelfinder.configuration.PopulateDBConfiguration; import org.phoebus.channelfinder.service.AuthorizationService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; import org.springframework.security.test.context.support.WithMockUser; import org.springframework.test.context.TestPropertySource; diff --git a/src/test/java/org/phoebus/channelfinder/processors/ChannelProcessorControllerIT.java b/src/test/java/org/phoebus/channelfinder/processors/ChannelProcessorControllerIT.java index 4d1a9492..866aa9a6 100644 --- a/src/test/java/org/phoebus/channelfinder/processors/ChannelProcessorControllerIT.java +++ b/src/test/java/org/phoebus/channelfinder/processors/ChannelProcessorControllerIT.java @@ -16,7 +16,7 @@ import org.phoebus.channelfinder.service.external.ArchiverService; import org.phoebus.channelfinder.web.v0.controller.ChannelProcessorController; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; import org.springframework.http.HttpHeaders; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.bean.override.mockito.MockitoBean; diff --git a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorIT.java b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorIT.java index 3b70af37..e957dfad 100644 --- a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorIT.java +++ b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorIT.java @@ -27,7 +27,7 @@ import org.phoebus.channelfinder.service.model.archiver.aa.ArchiveAction; import org.phoebus.channelfinder.service.model.archiver.aa.ArchivePVOptions; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.bean.override.mockito.MockitoBean; import tools.jackson.core.JacksonException; diff --git a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorMultiArchiverIT.java b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorMultiArchiverIT.java index efe3dad4..48552c57 100644 --- a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorMultiArchiverIT.java +++ b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorMultiArchiverIT.java @@ -22,7 +22,7 @@ import org.phoebus.channelfinder.service.external.ArchiverService; import org.phoebus.channelfinder.service.model.archiver.aa.ArchiveAction; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.bean.override.mockito.MockitoBean; import tools.jackson.core.JacksonException; diff --git a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorMultiIT.java b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorMultiIT.java index dcb69fdb..3e919fac 100644 --- a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorMultiIT.java +++ b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorMultiIT.java @@ -25,7 +25,7 @@ import org.phoebus.channelfinder.service.model.archiver.aa.ArchiveAction; import org.phoebus.channelfinder.service.model.archiver.aa.ArchivePVOptions; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.bean.override.mockito.MockitoBean; import tools.jackson.core.JacksonException; diff --git a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorNoDefaultIT.java b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorNoDefaultIT.java index 075c27a8..38cdb1e4 100644 --- a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorNoDefaultIT.java +++ b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorNoDefaultIT.java @@ -14,7 +14,7 @@ import org.phoebus.channelfinder.entity.Property; import org.phoebus.channelfinder.service.external.ArchiverService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.bean.override.mockito.MockitoBean; import tools.jackson.core.JacksonException; diff --git a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorNoPauseIT.java b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorNoPauseIT.java index 50fb758d..9c6342bf 100644 --- a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorNoPauseIT.java +++ b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorNoPauseIT.java @@ -13,7 +13,7 @@ import org.phoebus.channelfinder.entity.Channel; import org.phoebus.channelfinder.service.external.ArchiverService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.bean.override.mockito.MockitoBean; import tools.jackson.core.JacksonException; diff --git a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorStatusPauseIT.java b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorStatusPauseIT.java index a5c649bd..86b4f49c 100644 --- a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorStatusPauseIT.java +++ b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorStatusPauseIT.java @@ -13,7 +13,7 @@ import org.phoebus.channelfinder.entity.Channel; import org.phoebus.channelfinder.service.external.ArchiverService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.bean.override.mockito.MockitoBean; import tools.jackson.core.JacksonException; diff --git a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorTagPauseIT.java b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorTagPauseIT.java index bde2af37..1aeafff0 100644 --- a/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorTagPauseIT.java +++ b/src/test/java/org/phoebus/channelfinder/processors/aa/AAChannelProcessorTagPauseIT.java @@ -13,7 +13,7 @@ import org.phoebus.channelfinder.entity.Channel; import org.phoebus.channelfinder.service.external.ArchiverService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.bean.override.mockito.MockitoBean; import tools.jackson.core.JacksonException; From d5894471bb2393b98d07acb9caeeede26c96a894 Mon Sep 17 00:00:00 2001 From: Anders Lindh Olsson Date: Wed, 15 Apr 2026 14:14:13 +0200 Subject: [PATCH 10/10] fix(test): increase Docker IT startup tolerance for SB4 SB4's modular structure and JaCoCo instrumentation push container startup past the 30 s health-check interval, causing Testcontainers to time out before a second check can run. - compose.yml: add start_period: 60s so early failures don't burn retries - ITUtil: raise TC startup timeout from 60 s to 3 minutes --- src/test/java/org/phoebus/channelfinder/docker/ITUtil.java | 4 +++- src/test/resources/compose.yml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/phoebus/channelfinder/docker/ITUtil.java b/src/test/java/org/phoebus/channelfinder/docker/ITUtil.java index a99e417b..d5753c69 100644 --- a/src/test/java/org/phoebus/channelfinder/docker/ITUtil.java +++ b/src/test/java/org/phoebus/channelfinder/docker/ITUtil.java @@ -31,6 +31,7 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.net.http.HttpResponse.BodyHandlers; +import java.time.Duration; import java.util.Base64; import java.util.Optional; import org.springframework.http.HttpHeaders; @@ -104,7 +105,8 @@ public static ComposeContainer defaultComposeContainers() { return new ComposeContainer(new File(ITUtil.INTEGRATIONTEST_DOCKER_COMPOSE)) .withEnv(ITUtil.JACOCO_SKIPITCOVERAGE, System.getProperty(ITUtil.JACOCO_SKIPITCOVERAGE)) .withLocalCompose(true) - .waitingFor(ITUtil.CHANNELFINDER, Wait.forHealthcheck()); + .waitingFor( + ITUtil.CHANNELFINDER, Wait.forHealthcheck().withStartupTimeout(Duration.ofMinutes(3))); } /** diff --git a/src/test/resources/compose.yml b/src/test/resources/compose.yml index c5fccd12..d0519483 100644 --- a/src/test/resources/compose.yml +++ b/src/test/resources/compose.yml @@ -52,6 +52,7 @@ services: interval: 30s timeout: 60s retries: 5 + start_period: 60s elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:8.18.0