Skip to content

Commit 0f534a8

Browse files
authored
Test that client.address is always captured (#10369)
1 parent 9fd2819 commit 0f534a8

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

testing-common/src/main/java/io/opentelemetry/instrumentation/testing/junit/http/AbstractHttpServerTest.java

+1-8
Original file line numberDiff line numberDiff line change
@@ -760,14 +760,7 @@ protected SpanDataAssert assertServerSpan(
760760
.isNotEqualTo(Long.valueOf(port)));
761761
}
762762

763-
assertThat(attrs)
764-
.hasEntrySatisfying(
765-
SemanticAttributes.CLIENT_ADDRESS,
766-
entry ->
767-
assertThat(entry)
768-
.satisfiesAnyOf(
769-
value -> assertThat(value).isNull(),
770-
value -> assertThat(value).isEqualTo(TEST_CLIENT_IP)));
763+
assertThat(attrs).containsEntry(SemanticAttributes.CLIENT_ADDRESS, TEST_CLIENT_IP);
771764
// client.port is opt-in
772765
assertThat(attrs).doesNotContainKey(SemanticAttributes.CLIENT_PORT);
773766

0 commit comments

Comments
 (0)