Skip to content

Commit

Permalink
Java 15
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuraag Agrawal committed Jul 22, 2021
1 parent 3e84a54 commit 92865e0
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,13 @@ SpanDataAssert assertClientSpan(
// TODO(anuraaga): Move to test knob rather than always treating
// as optional
if (attrs.asMap().containsKey(SemanticAttributes.NET_PEER_IP)) {
assertThat(attrs).containsEntry(SemanticAttributes.NET_PEER_IP, "127.0.0.1");
if (uri.getHost().equals("192.0.2.1")) {
// NB(anuraaga): This branch seems to currently only be exercised on Java 15.
// It would be good to understand how the JVM version is impacting this check.
assertThat(attrs).containsEntry(SemanticAttributes.NET_PEER_IP, "192.0.2.1");
} else {
assertThat(attrs).containsEntry(SemanticAttributes.NET_PEER_IP, "127.0.0.1");
}
}

if (httpClientAttributes.contains(SemanticAttributes.HTTP_URL)) {
Expand Down

0 comments on commit 92865e0

Please sign in to comment.