Merge pull request #1240 from marcduiker/fix-java-wf-daprd-logs

Update TestContainer Config to show daprd logs
This commit is contained in:
Marc Duiker 2025-08-29 16:17:06 +02:00 committed by GitHub
commit 6695a89bfa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 42 additions and 49 deletions

View File

@ -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()));
}

View File

@ -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();
}
}
}
}

View File

@ -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()));
}
}
}

View File

@ -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()));
}
}
}

View File

@ -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()));
}
}
}

View File

@ -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()));
}
}
}

View File

@ -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()));
}
}
}

View File

@ -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()));
}
}
}

View File

@ -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()));
}
}
}