From a1337221eb95ef1c10a88ca6482852bed44d72a1 Mon Sep 17 00:00:00 2001 From: Gagan Juneja Date: Fri, 8 Sep 2023 16:55:15 +0530 Subject: [PATCH] Fix test case Signed-off-by: Gagan Juneja --- .../opensearch/telemetry/tracing/SpanBuilderTests.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/server/src/test/java/org/opensearch/telemetry/tracing/SpanBuilderTests.java b/server/src/test/java/org/opensearch/telemetry/tracing/SpanBuilderTests.java index b4183412cdf02..4fa79241e5b11 100644 --- a/server/src/test/java/org/opensearch/telemetry/tracing/SpanBuilderTests.java +++ b/server/src/test/java/org/opensearch/telemetry/tracing/SpanBuilderTests.java @@ -10,7 +10,6 @@ import org.opensearch.Version; import org.opensearch.cluster.node.DiscoveryNode; -import org.opensearch.common.network.NetworkAddress; import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.bytes.BytesReference; import org.opensearch.core.common.transport.TransportAddress; @@ -58,15 +57,6 @@ public void testRestRequestContextForNull() { assertEquals(Attributes.EMPTY, context.getAttributes()); } - public void testTransportContext() { - String action = "test-action"; - Transport.Connection connection = createTransportConnection(); - SpanCreationContext context = SpanBuilder.from(action, connection); - Attributes attributes = context.getAttributes(); - assertEquals(action + " " + NetworkAddress.format(TransportAddress.META_ADDRESS), context.getSpanName()); - assertEquals(connection.getNode().getHostAddress(), attributes.getAttributesMap().get(AttributeNames.TRANSPORT_TARGET_HOST)); - } - private static Transport.Connection createTransportConnection() { return new Transport.Connection() { @Override