Skip to content

Commit 802d0ec

Browse files
authored
Merge branch 'master' into development-cloudconfig
2 parents 51bbffc + ff917ac commit 802d0ec

File tree

4 files changed

+29
-41
lines changed

4 files changed

+29
-41
lines changed

sdk/src/test/java/io/dapr/client/DaprClientBuilderTest.java

+16-5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import io.dapr.exceptions.DaprException;
1919
import io.dapr.serializer.DaprObjectSerializer;
2020
import org.junit.jupiter.api.Test;
21+
import org.junit.jupiter.api.AfterEach;
2122

2223
import static org.junit.jupiter.api.Assertions.assertNotNull;
2324
import static org.junit.jupiter.api.Assertions.assertThrows;
@@ -27,6 +28,16 @@
2728

2829
public class DaprClientBuilderTest {
2930

31+
private DaprClient client;
32+
33+
@AfterEach
34+
public void cleanup() throws Exception {
35+
if (client != null) {
36+
client.close();
37+
client = null;
38+
}
39+
}
40+
3041
@Test
3142
public void build() {
3243
DaprObjectSerializer objectSerializer = mock(DaprObjectSerializer.class);
@@ -35,17 +46,17 @@ public void build() {
3546
DaprClientBuilder daprClientBuilder = new DaprClientBuilder();
3647
daprClientBuilder.withObjectSerializer(objectSerializer);
3748
daprClientBuilder.withStateSerializer(stateSerializer);
38-
DaprClient daprClient = daprClientBuilder.build();
39-
assertNotNull(daprClient);
49+
client = daprClientBuilder.build();
50+
assertNotNull(client);
4051
}
4152

4253
@Test
4354
public void buildWithOverrideSidecarIP() {
4455
DaprClientBuilder daprClientBuilder = new DaprClientBuilder();
4556
daprClientBuilder.withPropertyOverride(Properties.SIDECAR_IP, "unknownhost");
46-
DaprClient daprClient = daprClientBuilder.build();
47-
assertNotNull(daprClient);
48-
DaprException thrown = assertThrows(DaprException.class, () -> { daprClient.getMetadata().block(); });
57+
client = daprClientBuilder.build();
58+
assertNotNull(client);
59+
DaprException thrown = assertThrows(DaprException.class, () -> { client.getMetadata().block(); });
4960
assertTrue(thrown.toString().contains("UNAVAILABLE"), thrown.toString());
5061

5162
}

spring-boot-examples/consumer-app/pom.xml

-17
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
<name>consumer-app</name>
1313
<description>Spring Boot, Testcontainers and Dapr Integration Examples :: Consumer App</description>
1414

15-
<properties>
16-
<springboot.version>3.2.6</springboot.version>
17-
</properties>
1815

1916
<dependencyManagement>
2017
<dependencies>
@@ -37,12 +34,6 @@
3734
<groupId>org.springframework.boot</groupId>
3835
<artifactId>spring-boot-starter-actuator</artifactId>
3936
</dependency>
40-
<dependency>
41-
<groupId>io.dapr.spring</groupId>
42-
<artifactId>dapr-spring-boot-starter</artifactId>
43-
<version>${dapr-java-sdk.alpha-version}</version>
44-
</dependency>
45-
4637
<dependency>
4738
<groupId>io.dapr.spring</groupId>
4839
<artifactId>dapr-spring-boot-starter</artifactId>
@@ -93,14 +84,6 @@
9384
<groupId>org.springframework.boot</groupId>
9485
<artifactId>spring-boot-maven-plugin</artifactId>
9586
</plugin>
96-
<plugin>
97-
<groupId>org.apache.maven.plugins</groupId>
98-
<artifactId>maven-deploy-plugin</artifactId>
99-
<version>${maven-deploy-plugin.version}</version>
100-
<configuration>
101-
<skip>true</skip>
102-
</configuration>
103-
</plugin>
10487
<plugin>
10588
<groupId>org.apache.maven.plugins</groupId>
10689
<artifactId>maven-site-plugin</artifactId>

spring-boot-examples/pom.xml

+13-8
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,26 @@
1313
<version>0.15.0-SNAPSHOT</version>
1414
<packaging>pom</packaging>
1515

16+
<properties>
17+
<maven.deploy.skip>true</maven.deploy.skip>
18+
</properties>
19+
1620
<modules>
1721
<module>producer-app</module>
1822
<module>consumer-app</module>
1923
</modules>
2024

2125
<build>
26+
<pluginManagement>
27+
<plugins>
28+
<plugin>
29+
<groupId>org.springframework.boot</groupId>
30+
<artifactId>spring-boot-maven-plugin</artifactId>
31+
<version>${springboot.version}</version>
32+
</plugin>
33+
</plugins>
34+
</pluginManagement>
2235
<plugins>
23-
<plugin>
24-
<groupId>org.apache.maven.plugins</groupId>
25-
<artifactId>maven-deploy-plugin</artifactId>
26-
<version>${maven-deploy-plugin.version}</version>
27-
<configuration>
28-
<skip>true</skip>
29-
</configuration>
30-
</plugin>
3136
<plugin>
3237
<groupId>org.apache.maven.plugins</groupId>
3338
<artifactId>maven-site-plugin</artifactId>

spring-boot-examples/producer-app/pom.xml

-11
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
<name>producer-app</name>
1414
<description>Spring Boot, Testcontainers and Dapr Integration Examples :: Producer App</description>
1515

16-
<properties>
17-
<springboot.version>3.2.6</springboot.version>
18-
</properties>
1916

2017
<dependencyManagement>
2118
<dependencies>
@@ -80,14 +77,6 @@
8077
<groupId>org.springframework.boot</groupId>
8178
<artifactId>spring-boot-maven-plugin</artifactId>
8279
</plugin>
83-
<plugin>
84-
<groupId>org.apache.maven.plugins</groupId>
85-
<artifactId>maven-deploy-plugin</artifactId>
86-
<version>${maven-deploy-plugin.version}</version>
87-
<configuration>
88-
<skip>true</skip>
89-
</configuration>
90-
</plugin>
9180
<plugin>
9281
<groupId>org.apache.maven.plugins</groupId>
9382
<artifactId>maven-site-plugin</artifactId>

0 commit comments

Comments
 (0)