Skip to content

Commit de65597

Browse files
authored
Update to Spring Boot 3.3.0-M1
This commit updates the spring-boot-dependencies version to `3.3.0-M1`. This update also transitively updates the AssertJ core library to version `3.25.1` which introduces a deprecation for `AbstractAssert#toList`. As such, these deprecated usages are replaced in several tests with `AbstractAssert#asInstanceOf`. Resolves #10
1 parent c22404c commit de65597

File tree

5 files changed

+16
-21
lines changed

5 files changed

+16
-21
lines changed

dependencies.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ext {
2-
springBootVersion = '3.2.2'
2+
springBootVersion = '3.3.0-M1'
33
springCloudVersion = '2023.0.0'
44
springCloudAwsVersion = '3.0.4'
55

function/spring-aggregator-function/src/test/java/org/springframework/cloud/fn/aggregator/CustomPropsAndMongoMessageStoreAggregatorTests.java

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 the original author or authors.
2+
* Copyright 2020-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,8 +17,8 @@
1717
package org.springframework.cloud.fn.aggregator;
1818

1919
import java.time.Duration;
20-
import java.util.List;
2120

21+
import org.assertj.core.api.InstanceOfAssertFactories;
2222
import org.junit.jupiter.api.Test;
2323
import reactor.core.publisher.Flux;
2424
import reactor.test.StepVerifier;
@@ -60,11 +60,8 @@ public void test() {
6060

6161
output.as(StepVerifier::create)
6262
.assertNext((message) -> assertThat(message).extracting(Message::getPayload)
63-
.isInstanceOf(List.class)
64-
.asList()
65-
.hasSize(1)
66-
.element(0)
67-
.isEqualTo("foo"))
63+
.asInstanceOf(InstanceOfAssertFactories.LIST)
64+
.containsExactly("foo"))
6865
.thenCancel()
6966
.verify(Duration.ofSeconds(10));
7067

function/spring-aggregator-function/src/test/java/org/springframework/cloud/fn/aggregator/DefaultAggregatorTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import java.time.Duration;
2020

21+
import org.assertj.core.api.InstanceOfAssertFactories;
2122
import org.junit.jupiter.api.Disabled;
2223
import org.junit.jupiter.api.Test;
2324
import reactor.core.publisher.Flux;
@@ -57,9 +58,8 @@ public void test() {
5758
output.log("DefaultAggregatorTests:output")
5859
.as(StepVerifier::create)
5960
.assertNext((message) -> assertThat(message).extracting(Message::getPayload)
60-
.asList()
61-
.hasSize(2)
62-
.contains("1", "2"))
61+
.asInstanceOf(InstanceOfAssertFactories.LIST)
62+
.containsExactlyInAnyOrder("1", "2"))
6363
.thenCancel()
6464
.verify(Duration.ofSeconds(30));
6565

function/spring-aggregator-function/src/test/java/org/springframework/cloud/fn/aggregator/JdbcMessageStoreAggregatorTests.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 the original author or authors.
2+
* Copyright 2020-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,6 +19,7 @@
1919
import java.time.Duration;
2020
import java.util.List;
2121

22+
import org.assertj.core.api.InstanceOfAssertFactories;
2223
import org.junit.jupiter.api.Test;
2324
import reactor.core.publisher.Flux;
2425
import reactor.test.StepVerifier;
@@ -57,9 +58,8 @@ public void test() {
5758
output.as(StepVerifier::create)
5859
.assertNext((message) -> assertThat(message).extracting(Message::getPayload)
5960
.isInstanceOf(List.class)
60-
.asList()
61-
.hasSize(2)
62-
.contains("1", "2"))
61+
.asInstanceOf(InstanceOfAssertFactories.LIST)
62+
.containsExactlyInAnyOrder("1", "2"))
6363
.thenCancel()
6464
.verify(Duration.ofSeconds(10));
6565

function/spring-aggregator-function/src/test/java/org/springframework/cloud/fn/aggregator/RedisMessageStoreAggregatorTests.java

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2023 the original author or authors.
2+
* Copyright 2020-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,8 +19,8 @@
1919
import java.io.ByteArrayInputStream;
2020
import java.io.InputStream;
2121
import java.time.Duration;
22-
import java.util.List;
2322

23+
import org.assertj.core.api.InstanceOfAssertFactories;
2424
import org.junit.jupiter.api.Test;
2525
import reactor.core.publisher.Flux;
2626
import reactor.test.StepVerifier;
@@ -70,10 +70,8 @@ public void test() {
7070

7171
output.as(StepVerifier::create)
7272
.assertNext((message) -> assertThat(message).extracting(Message::getPayload)
73-
.isInstanceOf(List.class)
74-
.asList()
75-
.hasSize(2)
76-
.contains("1", "2"))
73+
.asInstanceOf(InstanceOfAssertFactories.LIST)
74+
.containsExactlyInAnyOrder("1", "2"))
7775
.thenCancel()
7876
.verify(Duration.ofSeconds(10));
7977

0 commit comments

Comments
 (0)