Skip to content

Commit 36a0140

Browse files
salaboycicoyleartursouzaartur-ciocanu
authored
Upgrading spring boot version to 3.4.3 (#1220)
* upgrading spring boot version to 3.4.3 Signed-off-by: salaboy <[email protected]> * removing sb 3.2.x Signed-off-by: salaboy <[email protected]> * fixing label Signed-off-by: salaboy <[email protected]> * using 3.3.9 to validate against sb 3.3.x Signed-off-by: salaboy <[email protected]> * found the issue with the version Signed-off-by: salaboy <[email protected]> * removing toxic dep from classpath Signed-off-by: salaboy <[email protected]> * removing excludes Signed-off-by: salaboy <[email protected]> * upgrading otel and logback Signed-off-by: salaboy <[email protected]> * waiting for Dapr to be done with init Signed-off-by: salaboy <[email protected]> * waiting for placement Signed-off-by: salaboy <[email protected]> * using awaitability to wait for placement Signed-off-by: salaboy <[email protected]> * waiting for placement, but still flaky Signed-off-by: salaboy <[email protected]> * wait for app to be ready Signed-off-by: salaboy <[email protected]> * test with 1.14.4 Signed-off-by: salaboy <[email protected]> * Update DaprContainerIT.java Signed-off-by: Artur Souza <[email protected]> --------- Signed-off-by: salaboy <[email protected]> Signed-off-by: Artur Souza <[email protected]> Signed-off-by: artur-ciocanu <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: Artur Souza <[email protected]> Co-authored-by: artur-ciocanu <[email protected]>
1 parent efce229 commit 36a0140

File tree

5 files changed

+46
-40
lines changed

5 files changed

+46
-40
lines changed

.github/workflows/build.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ jobs:
2424
fail-fast: false
2525
matrix:
2626
java: [ 17 ]
27-
spring-boot-version: [ 3.2.6 ]
28-
spring-boot-display-version: [ 3.2.x ]
27+
spring-boot-version: [ 3.4.3 ]
28+
spring-boot-display-version: [ 3.4.x ]
2929
experimental: [ false ]
3030
include:
3131
- java: 17
32-
spring-boot-version: 3.3.0
32+
spring-boot-version: 3.3.9
3333
spring-boot-display-version: 3.3.x
3434
experimental: false
3535
env:

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<junit-bom.version>5.8.2</junit-bom.version>
4646
<snakeyaml.version>2.0</snakeyaml.version>
4747
<testcontainers.version>1.20.0</testcontainers.version>
48-
<springboot.version>3.2.6</springboot.version>
48+
<springboot.version>3.4.3</springboot.version>
4949
</properties>
5050

5151
<distributionManagement>

sdk-tests/pom.xml

+14-30
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
<protobuf.input.directory>${project.basedir}/proto</protobuf.input.directory>
2929
<grpc.version>1.69.0</grpc.version>
3030
<protobuf.version>3.25.5</protobuf.version>
31-
<opentelemetry.version>1.39.0</opentelemetry.version>
32-
<springboot.version>3.3.1</springboot.version>
33-
<logback-classic.version>1.4.12</logback-classic.version>
31+
<opentelemetry.version>1.41.0</opentelemetry.version>
32+
<springboot.version>3.4.3</springboot.version>
33+
<logback-core.version>1.5.16</logback-core.version>
3434
<wiremock.version>3.9.1</wiremock.version>
3535
<testcontainers-test.version>1.20.0</testcontainers-test.version>
3636
</properties>
@@ -49,11 +49,6 @@
4949
</dependencyManagement>
5050

5151
<dependencies>
52-
<dependency>
53-
<groupId>commons-cli</groupId>
54-
<artifactId>commons-cli</artifactId>
55-
<version>1.4</version>
56-
</dependency>
5752
<dependency>
5853
<groupId>io.grpc</groupId>
5954
<artifactId>grpc-protobuf</artifactId>
@@ -70,14 +65,9 @@
7065
<version>${grpc.version}</version>
7166
</dependency>
7267
<dependency>
73-
<groupId>com.google.protobuf</groupId>
74-
<artifactId>protobuf-java-util</artifactId>
75-
<version>${protobuf.version}</version>
76-
</dependency>
77-
<dependency>
78-
<groupId>com.github.os72</groupId>
79-
<artifactId>protoc-jar-maven-plugin</artifactId>
80-
<version>3.11.4</version>
68+
<groupId>commons-io</groupId>
69+
<artifactId>commons-io</artifactId>
70+
<version>2.14.0</version>
8171
</dependency>
8272
<dependency>
8373
<groupId>io.opentelemetry</groupId>
@@ -178,32 +168,20 @@
178168
<groupId>org.springframework.data</groupId>
179169
<artifactId>spring-data-keyvalue</artifactId>
180170
</dependency>
181-
<dependency>
182-
<groupId>org.springframework.boot</groupId>
183-
<artifactId>spring-boot-starter-test</artifactId>
184-
<scope>test</scope>
185-
</dependency>
186171
<dependency>
187172
<groupId>org.wiremock</groupId>
188173
<artifactId>wiremock-standalone</artifactId>
189174
<version>${wiremock.version}</version>
190175
<scope>test</scope>
191176
</dependency>
192-
<dependency>
193-
<groupId>ch.qos.logback</groupId>
194-
<artifactId>logback-classic</artifactId>
195-
<version>${logback-classic.version}</version>
196-
<scope>test</scope>
197-
</dependency>
198177
<dependency>
199178
<groupId>org.springframework.boot</groupId>
200179
<artifactId>spring-boot-starter-web</artifactId>
201180
<scope>test</scope>
202181
</dependency>
203182
<dependency>
204-
<groupId>io.projectreactor</groupId>
205-
<artifactId>reactor-core</artifactId>
206-
<version>3.6.7</version>
183+
<groupId>org.springframework.boot</groupId>
184+
<artifactId>spring-boot-starter-test</artifactId>
207185
<scope>test</scope>
208186
</dependency>
209187
<dependency>
@@ -212,6 +190,12 @@
212190
<version>3.9</version>
213191
<scope>test</scope>
214192
</dependency>
193+
<dependency>
194+
<groupId>ch.qos.logback</groupId>
195+
<artifactId>logback-core</artifactId>
196+
<version>${logback-core.version}</version>
197+
<scope>test</scope>
198+
</dependency>
215199
<dependency>
216200
<groupId>org.testcontainers</groupId>
217201
<artifactId>postgresql</artifactId>

sdk-tests/src/test/java/io/dapr/it/actors/app/TestApplication.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,12 @@
2121
*/
2222
@SpringBootApplication
2323
public class TestApplication {
24-
2524
/**
2625
* Starts Dapr's callback in a given port.
2726
* @param port Port to listen to.
2827
*/
2928
public static void start(long port) {
30-
SpringApplication app = new SpringApplication(TestApplication.class);
31-
app.run(String.format("--server.port=%d", port));
29+
SpringApplication.run(TestApplication.class, String.format("--server.port=%d", port));
3230
}
3331

3432
}

sdk-tests/src/test/java/io/dapr/it/testcontainers/DaprContainerIT.java

+27-3
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,15 @@
2727
import org.junit.jupiter.api.BeforeEach;
2828
import org.junit.jupiter.api.Tag;
2929
import org.junit.jupiter.api.Test;
30+
import org.testcontainers.containers.wait.strategy.Wait;
3031
import org.testcontainers.junit.jupiter.Container;
3132
import org.testcontainers.junit.jupiter.Testcontainers;
33+
import static org.testcontainers.shaded.org.awaitility.Awaitility.await;
34+
import org.testcontainers.shaded.org.awaitility.core.ConditionTimeoutException;
3235

3336
import java.io.IOException;
3437
import java.util.Map;
38+
import java.util.concurrent.TimeUnit;
3539

3640
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
3741
import static com.github.tomakehurst.wiremock.client.WireMock.any;
@@ -48,6 +52,8 @@
4852
import static org.junit.jupiter.api.Assertions.assertEquals;
4953
import static org.junit.jupiter.api.Assertions.assertNotNull;
5054
import static org.junit.jupiter.api.Assertions.assertTrue;
55+
import static org.junit.jupiter.api.Assertions.fail;
56+
5157

5258
@Testcontainers
5359
@WireMockTest(httpPort = 8081)
@@ -60,6 +66,7 @@ public class DaprContainerIT {
6066
private static final String KEY = "my-key";
6167
private static final String PUBSUB_NAME = "pubsub";
6268
private static final String PUBSUB_TOPIC_NAME = "topic";
69+
private static final String APP_FOUND_MESSAGE_PATTERN = ".*application discovered on port 8081.*";
6370

6471
@Container
6572
private static final DaprContainer DAPR_CONTAINER = new DaprContainer(IMAGE_TAG)
@@ -129,9 +136,26 @@ public void testStateStore() throws Exception {
129136

130137
@Test
131138
public void testPlacement() throws Exception {
132-
// Dapr and Placement need some time to connect
133-
Thread.sleep(1000);
139+
Wait.forLogMessage(APP_FOUND_MESSAGE_PATTERN, 1).waitUntilReady(DAPR_CONTAINER);
140+
try {
141+
await().atMost(10, TimeUnit.SECONDS)
142+
.pollDelay(500, TimeUnit.MILLISECONDS)
143+
.pollInterval(500, TimeUnit.MILLISECONDS)
144+
.until(() -> {
145+
String metadata = checkSidecarMetadata();
146+
if (metadata.contains("placement: connected")) {
147+
return true;
148+
} else {
149+
return false;
150+
}
151+
});
152+
} catch (ConditionTimeoutException timeoutException) {
153+
fail("The placement server is not connected");
154+
}
155+
156+
}
134157

158+
private String checkSidecarMetadata() throws IOException {
135159
OkHttpClient okHttpClient = new OkHttpClient.Builder()
136160
.build();
137161
Request request = new Request.Builder()
@@ -140,7 +164,7 @@ public void testPlacement() throws Exception {
140164

141165
try (Response response = okHttpClient.newCall(request).execute()) {
142166
if (response.isSuccessful() && response.body() != null) {
143-
assertTrue(response.body().string().contains("placement: connected"));
167+
return response.body().string();
144168
} else {
145169
throw new IOException("Unexpected response: " + response.code());
146170
}

0 commit comments

Comments
 (0)