Skip to content

Commit

Permalink
updating sdk-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
salaboy committed Sep 3, 2024
1 parent e8a2663 commit 1850c5b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 25 deletions.
6 changes: 6 additions & 0 deletions sdk-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,12 @@
<version>${dapr.sdk.alpha.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.dapr.spring</groupId>
<artifactId>dapr-spring-boot-tests</artifactId>
<version>${dapr.sdk.alpha.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-keyvalue</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import io.dapr.client.DaprClient;
import io.dapr.spring.boot.autoconfigure.client.DaprClientAutoConfiguration;
import io.dapr.spring.core.client.DaprClientCustomizer;
import io.dapr.spring.data.DaprKeyValueAdapterResolver;
import io.dapr.spring.data.DaprKeyValueTemplate;
import io.dapr.spring.data.KeyValueAdapterResolver;
import io.dapr.spring.data.repository.config.EnableDaprRepositories;
import io.dapr.testcontainers.TestcontainersDaprClientCustomizer;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
Expand All @@ -23,15 +20,6 @@ public ObjectMapper mapper() {
return new ObjectMapper();
}

@Bean
public DaprClientCustomizer daprClientCustomizer(
@Value("${dapr.http.endpoint}") String daprHttpEndpoint,
@Value("${dapr.grpc.endpoint}") String daprGrpcEndpoint,
@Value("${dapr.http.port}") String daprHttpPort,
@Value("${dapr.grpc.port}") String daprGrpcPort
){
return new TestcontainersDaprClientCustomizer(daprHttpEndpoint, daprGrpcEndpoint, daprHttpPort, daprGrpcPort);
}

@Bean
public KeyValueAdapterResolver keyValueAdapterResolver(DaprClient daprClient, ObjectMapper mapper) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@

import io.dapr.client.DaprClient;
import io.dapr.spring.boot.autoconfigure.pubsub.DaprPubSubProperties;
import io.dapr.spring.core.client.DaprClientCustomizer;
import io.dapr.spring.messaging.DaprMessagingTemplate;
import io.dapr.testcontainers.TestcontainersDaprClientCustomizer;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
Expand All @@ -35,16 +32,6 @@ public static void main(String[] args) {
@EnableConfigurationProperties(DaprPubSubProperties.class)
static class DaprSpringMessagingConfiguration {

@Bean
public DaprClientCustomizer daprClientCustomizer(
@Value("${dapr.http.endpoint}") String daprHttpEndpoint,
@Value("${dapr.grpc.endpoint}") String daprGrpcEndpoint,
@Value("${dapr.http.port}") String daprHttpPort,
@Value("${dapr.grpc.port}") String daprGrpcPort
){
return new TestcontainersDaprClientCustomizer(daprHttpEndpoint, daprGrpcEndpoint, daprHttpPort, daprGrpcPort);
}

@Bean
public DaprMessagingTemplate<String> messagingTemplate(DaprClient daprClient,
DaprPubSubProperties daprPubSubProperties) {
Expand Down

0 comments on commit 1850c5b

Please sign in to comment.