From c65a0457bb1f3c13a69aa9bd14c7d1b641292a21 Mon Sep 17 00:00:00 2001 From: Marc Duiker Date: Fri, 29 Aug 2025 15:29:56 +0200 Subject: [PATCH] Update TestContainer Condfig to show daprd logs Signed-off-by: Marc Duiker --- .../springboot/examples/DaprTestContainersConfig.java | 5 ++++- .../workflowapp/DaprTestContainersConfig.java | 9 +++------ .../springboot/examples/DaprTestContainersConfig.java | 11 +++++------ .../springboot/examples/DaprTestContainersConfig.java | 11 +++++------ .../springboot/examples/DaprTestContainersConfig.java | 11 +++++------ .../springboot/examples/DaprTestContainersConfig.java | 11 +++++------ .../springboot/examples/DaprTestContainersConfig.java | 11 +++++------ .../springboot/examples/DaprTestContainersConfig.java | 11 +++++------ .../springboot/examples/DaprTestContainersConfig.java | 11 +++++------ 9 files changed, 42 insertions(+), 49 deletions(-) diff --git a/tutorials/workflow/java/child-workflows/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java b/tutorials/workflow/java/child-workflows/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java index 7ba40037..ec83692b 100644 --- a/tutorials/workflow/java/child-workflows/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java +++ b/tutorials/workflow/java/child-workflows/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java @@ -15,6 +15,7 @@ package io.dapr.springboot.examples; import io.dapr.testcontainers.Component; import io.dapr.testcontainers.DaprContainer; +import io.dapr.testcontainers.DaprLogLevel; import org.springframework.boot.test.context.TestConfiguration; import org.springframework.boot.testcontainers.service.connection.ServiceConnection; import org.springframework.context.annotation.Bean; @@ -34,7 +35,9 @@ public class DaprTestContainersConfig { .withComponent(new Component("kvstore", "state.in-memory", "v1", Collections.singletonMap("actorStateStore", String.valueOf(true)))) .withAppPort(8080) .withAppHealthCheckPath("/actuator/health") - .withAppChannelAddress("host.testcontainers.internal"); + .withAppChannelAddress("host.testcontainers.internal") + .withDaprLogLevel(DaprLogLevel.INFO) + .withLogConsumer(outputFrame -> System.out.println(outputFrame.getUtf8String())); } diff --git a/tutorials/workflow/java/combined-patterns/workflow-app/src/test/java/io/dapr/springboot/workflowapp/DaprTestContainersConfig.java b/tutorials/workflow/java/combined-patterns/workflow-app/src/test/java/io/dapr/springboot/workflowapp/DaprTestContainersConfig.java index e1d2ff50..a704b17b 100644 --- a/tutorials/workflow/java/combined-patterns/workflow-app/src/test/java/io/dapr/springboot/workflowapp/DaprTestContainersConfig.java +++ b/tutorials/workflow/java/combined-patterns/workflow-app/src/test/java/io/dapr/springboot/workflowapp/DaprTestContainersConfig.java @@ -67,8 +67,8 @@ public class DaprTestContainersConfig { .withReuseScheduler(reuse) .withAppHealthCheckPath("/actuator/health") .withAppChannelAddress("host.testcontainers.internal") -// .withDaprLogLevel(DaprLogLevel.DEBUG) -// .withLogConsumer(outputFrame -> System.out.println(outputFrame.getUtf8String())) + .withDaprLogLevel(DaprLogLevel.INFO) + .withLogConsumer(outputFrame -> System.out.println(outputFrame.getUtf8String())) .dependsOn(redisContainer); } @@ -106,7 +106,4 @@ public class DaprTestContainersConfig { return Network.newNetwork(); } } - - - -} +} \ No newline at end of file diff --git a/tutorials/workflow/java/external-system-interactions/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java b/tutorials/workflow/java/external-system-interactions/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java index 18e16961..dd7ff4fc 100644 --- a/tutorials/workflow/java/external-system-interactions/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java +++ b/tutorials/workflow/java/external-system-interactions/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java @@ -15,6 +15,7 @@ package io.dapr.springboot.examples; import io.dapr.testcontainers.Component; import io.dapr.testcontainers.DaprContainer; +import io.dapr.testcontainers.DaprLogLevel; import org.springframework.boot.test.context.TestConfiguration; import org.springframework.boot.testcontainers.service.connection.ServiceConnection; import org.springframework.context.annotation.Bean; @@ -34,10 +35,8 @@ public class DaprTestContainersConfig { .withComponent(new Component("kvstore", "state.in-memory", "v1", Collections.singletonMap("actorStateStore", String.valueOf(true)))) .withAppPort(8080) .withAppHealthCheckPath("/actuator/health") - .withAppChannelAddress("host.testcontainers.internal"); + .withAppChannelAddress("host.testcontainers.internal") + .withDaprLogLevel(DaprLogLevel.INFO) + .withLogConsumer(outputFrame -> System.out.println(outputFrame.getUtf8String())); } - - - - -} +} \ No newline at end of file diff --git a/tutorials/workflow/java/fan-out-fan-in/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java b/tutorials/workflow/java/fan-out-fan-in/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java index 2613c21d..b074dc14 100644 --- a/tutorials/workflow/java/fan-out-fan-in/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java +++ b/tutorials/workflow/java/fan-out-fan-in/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java @@ -15,6 +15,7 @@ package io.dapr.springboot.examples; import io.dapr.testcontainers.Component; import io.dapr.testcontainers.DaprContainer; +import io.dapr.testcontainers.DaprLogLevel; import org.springframework.boot.test.context.TestConfiguration; import org.springframework.boot.testcontainers.service.connection.ServiceConnection; import org.springframework.context.annotation.Bean; @@ -34,10 +35,8 @@ public class DaprTestContainersConfig { .withComponent(new Component("kvstore", "state.in-memory", "v1", Collections.singletonMap("actorStateStore", String.valueOf(true)))) .withAppPort(8080) .withAppHealthCheckPath("/actuator/health") - .withAppChannelAddress("host.testcontainers.internal"); + .withAppChannelAddress("host.testcontainers.internal") + .withDaprLogLevel(DaprLogLevel.INFO) + .withLogConsumer(outputFrame -> System.out.println(outputFrame.getUtf8String())); } - - - - -} +} \ No newline at end of file diff --git a/tutorials/workflow/java/fundamentals/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java b/tutorials/workflow/java/fundamentals/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java index 0918cd64..c7e05e63 100644 --- a/tutorials/workflow/java/fundamentals/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java +++ b/tutorials/workflow/java/fundamentals/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java @@ -15,6 +15,7 @@ package io.dapr.springboot.examples; import io.dapr.testcontainers.Component; import io.dapr.testcontainers.DaprContainer; +import io.dapr.testcontainers.DaprLogLevel; import org.springframework.boot.test.context.TestConfiguration; import org.springframework.boot.testcontainers.service.connection.ServiceConnection; import org.springframework.context.annotation.Bean; @@ -34,10 +35,8 @@ public class DaprTestContainersConfig { .withComponent(new Component("kvstore", "state.in-memory", "v1", Collections.singletonMap("actorStateStore", String.valueOf(true)))) .withAppPort(8080) .withAppHealthCheckPath("/actuator/health") - .withAppChannelAddress("host.testcontainers.internal"); + .withAppChannelAddress("host.testcontainers.internal") + .withDaprLogLevel(DaprLogLevel.INFO) + .withLogConsumer(outputFrame -> System.out.println(outputFrame.getUtf8String())); } - - - - -} +} \ No newline at end of file diff --git a/tutorials/workflow/java/monitor-pattern/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java b/tutorials/workflow/java/monitor-pattern/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java index 8091e3bc..85b37e0e 100644 --- a/tutorials/workflow/java/monitor-pattern/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java +++ b/tutorials/workflow/java/monitor-pattern/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java @@ -15,6 +15,7 @@ package io.dapr.springboot.examples; import io.dapr.testcontainers.Component; import io.dapr.testcontainers.DaprContainer; +import io.dapr.testcontainers.DaprLogLevel; import org.springframework.boot.test.context.TestConfiguration; import org.springframework.boot.testcontainers.service.connection.ServiceConnection; import org.springframework.context.annotation.Bean; @@ -34,10 +35,8 @@ public class DaprTestContainersConfig { .withComponent(new Component("kvstore", "state.in-memory", "v1", Collections.singletonMap("actorStateStore", String.valueOf(true)))) .withAppPort(8080) .withAppHealthCheckPath("/actuator/health") - .withAppChannelAddress("host.testcontainers.internal"); + .withAppChannelAddress("host.testcontainers.internal") + .withDaprLogLevel(DaprLogLevel.INFO) + .withLogConsumer(outputFrame -> System.out.println(outputFrame.getUtf8String())); } - - - - -} +} \ No newline at end of file diff --git a/tutorials/workflow/java/resiliency-and-compensation/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java b/tutorials/workflow/java/resiliency-and-compensation/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java index 7ba40037..b0cf09fb 100644 --- a/tutorials/workflow/java/resiliency-and-compensation/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java +++ b/tutorials/workflow/java/resiliency-and-compensation/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java @@ -15,6 +15,7 @@ package io.dapr.springboot.examples; import io.dapr.testcontainers.Component; import io.dapr.testcontainers.DaprContainer; +import io.dapr.testcontainers.DaprLogLevel; import org.springframework.boot.test.context.TestConfiguration; import org.springframework.boot.testcontainers.service.connection.ServiceConnection; import org.springframework.context.annotation.Bean; @@ -34,10 +35,8 @@ public class DaprTestContainersConfig { .withComponent(new Component("kvstore", "state.in-memory", "v1", Collections.singletonMap("actorStateStore", String.valueOf(true)))) .withAppPort(8080) .withAppHealthCheckPath("/actuator/health") - .withAppChannelAddress("host.testcontainers.internal"); + .withAppChannelAddress("host.testcontainers.internal") + .withDaprLogLevel(DaprLogLevel.INFO) + .withLogConsumer(outputFrame -> System.out.println(outputFrame.getUtf8String())); } - - - - -} +} \ No newline at end of file diff --git a/tutorials/workflow/java/task-chaining/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java b/tutorials/workflow/java/task-chaining/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java index 7ba40037..b0cf09fb 100644 --- a/tutorials/workflow/java/task-chaining/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java +++ b/tutorials/workflow/java/task-chaining/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java @@ -15,6 +15,7 @@ package io.dapr.springboot.examples; import io.dapr.testcontainers.Component; import io.dapr.testcontainers.DaprContainer; +import io.dapr.testcontainers.DaprLogLevel; import org.springframework.boot.test.context.TestConfiguration; import org.springframework.boot.testcontainers.service.connection.ServiceConnection; import org.springframework.context.annotation.Bean; @@ -34,10 +35,8 @@ public class DaprTestContainersConfig { .withComponent(new Component("kvstore", "state.in-memory", "v1", Collections.singletonMap("actorStateStore", String.valueOf(true)))) .withAppPort(8080) .withAppHealthCheckPath("/actuator/health") - .withAppChannelAddress("host.testcontainers.internal"); + .withAppChannelAddress("host.testcontainers.internal") + .withDaprLogLevel(DaprLogLevel.INFO) + .withLogConsumer(outputFrame -> System.out.println(outputFrame.getUtf8String())); } - - - - -} +} \ No newline at end of file diff --git a/tutorials/workflow/java/workflow-management/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java b/tutorials/workflow/java/workflow-management/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java index 7ba40037..b0cf09fb 100644 --- a/tutorials/workflow/java/workflow-management/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java +++ b/tutorials/workflow/java/workflow-management/src/test/java/io/dapr/springboot/examples/DaprTestContainersConfig.java @@ -15,6 +15,7 @@ package io.dapr.springboot.examples; import io.dapr.testcontainers.Component; import io.dapr.testcontainers.DaprContainer; +import io.dapr.testcontainers.DaprLogLevel; import org.springframework.boot.test.context.TestConfiguration; import org.springframework.boot.testcontainers.service.connection.ServiceConnection; import org.springframework.context.annotation.Bean; @@ -34,10 +35,8 @@ public class DaprTestContainersConfig { .withComponent(new Component("kvstore", "state.in-memory", "v1", Collections.singletonMap("actorStateStore", String.valueOf(true)))) .withAppPort(8080) .withAppHealthCheckPath("/actuator/health") - .withAppChannelAddress("host.testcontainers.internal"); + .withAppChannelAddress("host.testcontainers.internal") + .withDaprLogLevel(DaprLogLevel.INFO) + .withLogConsumer(outputFrame -> System.out.println(outputFrame.getUtf8String())); } - - - - -} +} \ No newline at end of file