Skip to content

Commit 70a2890

Browse files
committed
Fix some assertions
1 parent 68ee2f6 commit 70a2890

File tree

15 files changed

+18
-18
lines changed

15 files changed

+18
-18
lines changed

instrumentation/azure-core/azure-core-1.14/javaagent/src/testAzure/java/io/opentelemetry/javaagent/instrumentation/azurecore/v1_14/AzureSdkTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ void testSpan() {
5555
span.hasName("hello")
5656
.hasKind(SpanKind.INTERNAL)
5757
.hasStatus(StatusData.ok())
58-
.hasAttributesSatisfying(Attributes::isEmpty)));
58+
.hasAttributes(Attributes.empty())));
5959
}
6060
}

instrumentation/azure-core/azure-core-1.19/javaagent/src/testAzure/java/io/opentelemetry/javaagent/instrumentation/azurecore/v1_19/AzureSdkTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ void testSpan() {
5555
span.hasName("hello")
5656
.hasKind(SpanKind.INTERNAL)
5757
.hasStatus(StatusData.ok())
58-
.hasAttributesSatisfying(Attributes::isEmpty)));
58+
.hasAttributes(Attributes.empty())));
5959
}
6060
}

instrumentation/azure-core/azure-core-1.36/javaagent/src/testAzure/java/io/opentelemetry/javaagent/instrumentation/azurecore/v1_36/AzureSdkTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void testSpan() {
4545
span.hasName("hello")
4646
.hasKind(SpanKind.INTERNAL)
4747
.hasStatus(StatusData.unset())
48-
.hasAttributesSatisfying(Attributes::isEmpty)));
48+
.hasAttributes(Attributes.empty())));
4949
}
5050

5151
private static com.azure.core.util.tracing.Tracer createAzTracer() {

instrumentation/azure-core/azure-core-1.36/javaagent/src/testAzure/java/io/opentelemetry/javaagent/instrumentation/azurecore/v1_36/AzureSdkTestOld.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void testSpan() {
5050
span.hasName("hello")
5151
.hasKind(SpanKind.INTERNAL)
5252
.hasStatus(StatusData.unset())
53-
.hasAttributesSatisfying(Attributes::isEmpty)));
53+
.hasAttributes(Attributes.empty())));
5454
}
5555

5656
private static com.azure.core.util.tracing.Tracer createAzTracer() {

instrumentation/grails-3.0/javaagent/src/test/java/test/GrailsTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public SpanDataAssert assertResponseSpan(
165165
} else {
166166
span.satisfies(spanData -> assertThat(spanData.getName()).endsWith(".sendError"));
167167
}
168-
span.hasKind(SpanKind.INTERNAL).hasAttributesSatisfying(Attributes::isEmpty);
168+
span.hasKind(SpanKind.INTERNAL).hasAttributes(Attributes.empty());
169169
return span;
170170
}
171171

@@ -178,13 +178,13 @@ public List<Consumer<SpanDataAssert>> errorPageSpanAssertions(
178178
span.hasName(
179179
endpoint == NOT_FOUND ? "ErrorController.notFound" : "ErrorController.index")
180180
.hasKind(SpanKind.INTERNAL)
181-
.hasAttributesSatisfying(Attributes::isEmpty));
181+
.hasAttributes(Attributes.empty()));
182182
if (endpoint == NOT_FOUND) {
183183
spanAssertions.add(
184184
span ->
185185
span.satisfies(spanData -> assertThat(spanData.getName()).endsWith(".sendError"))
186186
.hasKind(SpanKind.INTERNAL)
187-
.hasAttributesSatisfying(Attributes::isEmpty));
187+
.hasAttributes(Attributes.empty()));
188188
}
189189
return spanAssertions;
190190
}

instrumentation/graphql-java/graphql-java-common/testing/src/main/java/io/opentelemetry/instrumentation/graphql/AbstractGraphqlTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ void parseError() {
238238
span.hasName("GraphQL Operation")
239239
.hasKind(SpanKind.INTERNAL)
240240
.hasNoParent()
241-
.hasAttributesSatisfying(Attributes::isEmpty)
241+
.hasAttributes(Attributes.empty())
242242
.hasStatus(StatusData.error())
243243
.hasEventsSatisfyingExactly(
244244
event ->
@@ -280,7 +280,7 @@ void validationError() {
280280
span.hasName("GraphQL Operation")
281281
.hasKind(SpanKind.INTERNAL)
282282
.hasNoParent()
283-
.hasAttributesSatisfying(Attributes::isEmpty)
283+
.hasAttributes(Attributes.empty())
284284
.hasStatus(StatusData.error())
285285
.hasEventsSatisfyingExactly(
286286
event ->

instrumentation/jetty/jetty-11.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/jetty/v11_0/JettyHandlerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ protected SpanDataAssert assertResponseSpan(
9494
} else if (endpoint == ERROR) {
9595
span.satisfies(spanData -> assertThat(spanData.getName()).endsWith(".sendError"));
9696
}
97-
span.hasKind(SpanKind.INTERNAL).hasAttributesSatisfying(Attributes::isEmpty);
97+
span.hasKind(SpanKind.INTERNAL).hasAttributes(Attributes.empty());
9898
return span;
9999
}
100100

instrumentation/jetty/jetty-12.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/jetty/v12_0/Jetty12HandlerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ protected SpanDataAssert assertResponseSpan(
7474
} else if (endpoint == ERROR) {
7575
span.satisfies(spanData -> assertThat(spanData.getName()).endsWith(".sendError"));
7676
}
77-
span.hasKind(SpanKind.INTERNAL).hasAttributesSatisfying(Attributes::isEmpty);
77+
span.hasKind(SpanKind.INTERNAL).hasAttributes(Attributes.empty());
7878
return span;
7979
}
8080

instrumentation/jetty/jetty-8.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/jetty/v8_0/JettyHandlerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ protected SpanDataAssert assertResponseSpan(
9494
} else if (endpoint == ERROR) {
9595
span.satisfies(spanData -> assertThat(spanData.getName()).endsWith(".sendError"));
9696
}
97-
span.hasKind(SpanKind.INTERNAL).hasAttributesSatisfying(Attributes::isEmpty);
97+
span.hasKind(SpanKind.INTERNAL).hasAttributes(Attributes.empty());
9898
return span;
9999
}
100100

instrumentation/spring/spring-webmvc/spring-webmvc-common/testing/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/boot/AbstractSpringBootBasedTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ protected List<Consumer<SpanDataAssert>> errorPageSpanAssertions(
149149
span ->
150150
span.hasName("BasicErrorController.error")
151151
.hasKind(SpanKind.INTERNAL)
152-
.hasAttributesSatisfying(Attributes::isEmpty));
152+
.hasAttributes(Attributes.empty()));
153153
return spanAssertions;
154154
}
155155

0 commit comments

Comments
 (0)