diff --git a/sdk-tests/src/test/java/io/dapr/it/actors/services/springboot/StatefulActorService.java b/sdk-tests/src/test/java/io/dapr/it/actors/services/springboot/StatefulActorService.java index 3a15a0c6b..c96fa05d0 100644 --- a/sdk-tests/src/test/java/io/dapr/it/actors/services/springboot/StatefulActorService.java +++ b/sdk-tests/src/test/java/io/dapr/it/actors/services/springboot/StatefulActorService.java @@ -14,10 +14,12 @@ package io.dapr.it.actors.services.springboot; import io.dapr.actors.runtime.ActorRuntime; +import io.dapr.it.DaprRunConfig; import io.dapr.serializer.DefaultObjectSerializer; import java.time.Duration; +@DaprRunConfig(enableDaprApiToken = false) public class StatefulActorService { public static final String SUCCESS_MESSAGE = "dapr initialized. Status: Running"; diff --git a/sdk-tests/src/test/java/io/dapr/it/state/HelloWorldGrpcStateService.java b/sdk-tests/src/test/java/io/dapr/it/state/HelloWorldGrpcStateService.java index a5b92eb8d..be493b469 100644 --- a/sdk-tests/src/test/java/io/dapr/it/state/HelloWorldGrpcStateService.java +++ b/sdk-tests/src/test/java/io/dapr/it/state/HelloWorldGrpcStateService.java @@ -14,7 +14,9 @@ package io.dapr.it.state; import com.google.protobuf.ByteString; +import io.dapr.client.DaprClientBuilder; import io.dapr.config.Properties; +import io.dapr.internal.grpc.DaprClientGrpcInterceptors; import io.dapr.v1.CommonProtos.StateItem; import io.dapr.v1.DaprGrpc; import io.dapr.v1.DaprGrpc.DaprBlockingStub; @@ -38,8 +40,11 @@ public static void main(String[] args) { // If port string is not valid, it will throw an exception. int grpcPortInt = Integer.parseInt(grpcPort); - ManagedChannel channel = ManagedChannelBuilder.forAddress(Properties.SIDECAR_IP.get(), grpcPortInt).usePlaintext().build(); - DaprBlockingStub client = DaprGrpc.newBlockingStub(channel); + ManagedChannel channel = ManagedChannelBuilder.forAddress( + Properties.SIDECAR_IP.get(), grpcPortInt).usePlaintext().build(); + DaprClientGrpcInterceptors interceptors = new DaprClientGrpcInterceptors( + Properties.API_TOKEN.get(), null); + DaprBlockingStub client = interceptors.intercept(DaprGrpc.newBlockingStub(channel)); String key = "mykey"; // First, write key-value pair.