Skip to content

Commit 1788d6f

Browse files
committed
update exception assert
1 parent 6b06a82 commit 1788d6f

File tree

1 file changed

+2
-1
lines changed
  • instrumentation/dropwizard/dropwizard-testing/src/test/java/io/opentelemetry/javaagent/instrumentation/dropwizard

1 file changed

+2
-1
lines changed

instrumentation/dropwizard/dropwizard-testing/src/test/java/io/opentelemetry/javaagent/instrumentation/dropwizard/DropwizardTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ protected SpanDataAssert assertHandlerSpan(
107107
span.hasName(testResource().getSimpleName() + "." + getEndpointName(endpoint))
108108
.hasKind(INTERNAL);
109109
if (EXCEPTION.equals(endpoint)) {
110-
span.hasStatus(StatusData.error()).hasException(new Exception(EXCEPTION.getBody()));
110+
span.hasStatus(StatusData.error())
111+
.hasException(new IllegalStateException(EXCEPTION.getBody()));
111112
}
112113
return span;
113114
}

0 commit comments

Comments
 (0)