Skip to content

Commit

Permalink
Update to Spring Boot 3.4.1
Browse files Browse the repository at this point in the history
This commit updates the following dependencies:

- Spring Boot to 3.4.2-SNAPSHOT
- Spring Cloud 2024.0.1-SNAPSHOT
- Spring Functions Catalog 5.1.0-SNAPSHOT

Also removes these unnecessary version properties:
- spring-cloud-stream.version
- spring-cloud-function.version
- spring-cloud-starters.version

Also removes dependency mgmt for the following:
- testcontainers-bom
- junit-bom
- jakarta-jms-api
- groovy-bom

Resolves #599 #600

* Remove Debezium Avro integration tests

This commit removes the DebeziumSupplierAvroFormatTest as it
relies on a dependency that has been removed in Spring Integration
and stream-applications. We should not need to test Debezium
support for Avro encoding.
  • Loading branch information
onobc authored Jan 9, 2025
1 parent c241e69 commit 95550f0
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 244 deletions.
3 changes: 0 additions & 3 deletions applications/sink/elasticsearch-sink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,16 @@
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>elasticsearch</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,8 @@

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.cloud.fn.consumer.elasticsearch.ElasticsearchConsumerConfiguration;
import org.springframework.cloud.stream.binder.test.InputDestination;
import org.springframework.cloud.stream.binder.test.TestChannelBinderConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.data.elasticsearch.client.ClientConfiguration;
import org.springframework.data.elasticsearch.client.elc.ElasticsearchConfiguration;
import org.springframework.lang.NonNull;
import org.springframework.messaging.support.GenericMessage;


Expand All @@ -59,24 +53,20 @@ public class ElasticsearchSinkTests {
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withUserConfiguration(TestChannelBinderConfiguration.getCompleteConfiguration(ElasticsearchSinkTestApplication.class));


@Test
void elasticSearchSinkWithIndexNameProperty() {
this.contextRunner
.withPropertyValues("spring.cloud.function.definition=elasticsearchConsumer",
"elasticsearch.consumer.index=foo", "elasticsearch.consumer.id=1",
"spring.elasticsearch.rest.uris=http://" + elasticsearch.getHttpHostAddress())
"spring.elasticsearch.uris=http://" + elasticsearch.getHttpHostAddress())
.run(context -> {

final InputDestination inputDestination = context.getBean(InputDestination.class);
final String jsonObject = "{\"age\":10,\"dateOfBirth\":1471466076564,"
InputDestination inputDestination = context.getBean(InputDestination.class);
String jsonObject = "{\"age\":10,\"dateOfBirth\":1471466076564,"
+ "\"fullName\":\"John Doe\"}";

inputDestination.send(new GenericMessage<>(jsonObject));

final ElasticsearchClient elasticsearchClient = context.getBean(ElasticsearchClient.class);
final GetRequest getRequest = new GetRequest.Builder().index("foo").id("1").build();
final GetResponse<JsonData> response = elasticsearchClient.get(getRequest, JsonData.class);
ElasticsearchClient elasticsearchClient = context.getBean(ElasticsearchClient.class);
GetRequest getRequest = new GetRequest.Builder().index("foo").id("1").build();
GetResponse<JsonData> response = elasticsearchClient.get(getRequest, JsonData.class);
assertThat(response.found()).isTrue();
assertThat(response.source()).isNotNull();
assertThat(response.source().toJson()).isEqualTo(JsonData.fromJson(jsonObject).toJson());
Expand All @@ -87,7 +77,7 @@ void elasticSearchSinkWithIndexNameProperty() {
void elasticSearchSinkWithIndexNameFromHeader() {
this.contextRunner
.withPropertyValues("spring.cloud.function.definition=elasticsearchConsumer", "elasticsearch.consumer.id=1",
"spring.elasticsearch.rest.uris=http://" + elasticsearch.getHttpHostAddress())
"spring.elasticsearch.uris=http://" + elasticsearch.getHttpHostAddress())
.run(context -> {

final InputDestination inputDestination = context.getBean(InputDestination.class);
Expand All @@ -106,19 +96,7 @@ void elasticSearchSinkWithIndexNameFromHeader() {
}

@SpringBootApplication
@Import(ElasticsearchConsumerConfiguration.class)
static class ElasticsearchSinkTestApplication {
}

@Configuration(proxyBeanMethods = false)
static class Config extends ElasticsearchConfiguration {
@NonNull
@Override
public ClientConfiguration clientConfiguration() {
return ClientConfiguration.builder()
.connectedTo(elasticsearch.getHttpHostAddress())
.build();
}
}

}
1 change: 0 additions & 1 deletion applications/sink/mqtt-sink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
3 changes: 0 additions & 3 deletions applications/sink/redis-sink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,16 @@
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
<version>${spring-cloud-starters.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion applications/source/mqtt-source/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.function.Supplier;

import org.junit.jupiter.api.Test;
Expand All @@ -37,7 +38,6 @@
import org.springframework.integration.websocket.ClientWebSocketContainer;
import org.springframework.messaging.Message;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.util.Base64Utils;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketSession;
import org.springframework.web.socket.client.standard.StandardWebSocketClient;
Expand Down Expand Up @@ -73,7 +73,7 @@ public void testWebsocketSource() throws IOException {
this.properties.getPath());

HttpHeaders httpHeaders = new HttpHeaders();
String token = Base64Utils.encodeToString(
String token = Base64.getEncoder().encodeToString(
(this.securityProperties.getUser().getName() + ":" + this.securityProperties.getUser().getPassword())
.getBytes(StandardCharsets.UTF_8));
httpHeaders.set(HttpHeaders.AUTHORIZATION, "Basic " + token);
Expand Down
39 changes: 1 addition & 38 deletions applications/stream-applications-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<properties>
<stream-apps-core.version>6.0.0-SNAPSHOT</stream-apps-core.version>
<java-functions.version>5.0.1</java-functions.version>
<java-functions.version>5.1.0-SNAPSHOT</java-functions.version>
<prometheus-rsocket.version>1.5.3</prometheus-rsocket.version>
<spring-cloud-dataflow-apps-generator-plugin.version>1.1.0-SNAPSHOT</spring-cloud-dataflow-apps-generator-plugin.version>
<spring-cloud-dataflow-apps-docs-plugin.version>1.1.0-SNAPSHOT</spring-cloud-dataflow-apps-docs-plugin.version>
Expand All @@ -42,38 +42,12 @@
<version>${java-functions.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-function-dependencies</artifactId>
<version>${spring-cloud-function.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-dependencies</artifactId>
<version>${spring-cloud-stream-dependencies.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.mock-server</groupId>
<artifactId>mockserver-netty</artifactId>
<version>${mockserver.version}</version>
</dependency>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.9.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-bom</artifactId>
<version>${testcontainers.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down Expand Up @@ -169,17 +143,6 @@
</metadata>
<maven>
<dependencyManagement>
<!-- Temporarily override SC-Fn dependency by giving it the highest precedence since 2020.0.5 release of spring-cloud will not take place until December -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-function-dependencies</artifactId>
<version>${spring-cloud-function.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-dependencies</artifactId>
<version>${spring-cloud-stream-dependencies.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
Expand Down
1 change: 0 additions & 1 deletion applications/stream-applications-integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>localstack</artifactId>
<version>${testcontainers.version}</version>
</dependency>
</dependencies>

Expand Down
Loading

0 comments on commit 95550f0

Please sign in to comment.