Additional http.status_code assertion
MODIFY
testing-common/src/main/java/io/opentelemetry/instrumentation/testing/junit/http/AbstractHttpClientTest.java
testing-common/src/main/java/io/opentelemetry/instrumentation/testing/junit/http/AbstractHttpClientTest.java
@@ -969,6 +969,9 @@ public abstract class AbstractHttpClientTest<REQUEST> {
if (responseCode != null) {
assertThat(attrs)
.containsEntry(SemanticAttributes.HTTP_STATUS_CODE, (long) responseCode);
+ } else {
+ // worth adding AttributesAssert.doesNotContainKey?
+ assertThat(attrs.get(SemanticAttributes.HTTP_STATUS_CODE)).isNull();
}
});
}

Additional http.status_code assertion (#4872)