From bd8519644932ce8e871b0cd2f4d118053d42e21a Mon Sep 17 00:00:00 2001 From: Lauri Tulmin Date: Mon, 25 Sep 2023 19:10:21 +0300 Subject: [PATCH] Debug flaky lettuce test (#9545) --- .../lettuce/v4_0/LettuceSyncClientTest.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/instrumentation/lettuce/lettuce-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/lettuce/v4_0/LettuceSyncClientTest.java b/instrumentation/lettuce/lettuce-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/lettuce/v4_0/LettuceSyncClientTest.java index 1f39745893e4..c2f012fdce71 100644 --- a/instrumentation/lettuce/lettuce-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/lettuce/v4_0/LettuceSyncClientTest.java +++ b/instrumentation/lettuce/lettuce-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/lettuce/v4_0/LettuceSyncClientTest.java @@ -20,17 +20,22 @@ import io.opentelemetry.instrumentation.testing.internal.AutoCleanupExtension; import io.opentelemetry.instrumentation.testing.junit.AgentInstrumentationExtension; import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension; +import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.semconv.SemanticAttributes; +import java.util.List; import java.util.Map; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.testcontainers.containers.GenericContainer; import org.testcontainers.utility.DockerImageName; @SuppressWarnings("deprecation") // until old http semconv are dropped in 2.0 class LettuceSyncClientTest { + private static final Logger logger = LoggerFactory.getLogger(LettuceSyncClientTest.class); @RegisterExtension protected static final InstrumentationExtension testing = AgentInstrumentationExtension.create(); @@ -85,7 +90,8 @@ static void setUp() { syncCommands.hmset("TESTHM", testHashMap); // 2 sets + 1 connect trace - testing.waitForTraces(3); + List> traces = testing.waitForTraces(3); + logger.info("setUp traces {}", traces); testing.clearData(); }