Skip to content

Commit

Permalink
Fix dropwizard tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Rzeszutek committed Dec 6, 2021
1 parent 185fc64 commit ede08a4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ class DropwizardTest extends HttpServerTest<DropwizardTestSupport> implements Ag
endpoint != NOT_FOUND
}

@Override
boolean hasResponseSpan(ServerEndpoint endpoint) {
endpoint == NOT_FOUND
}

@Override
boolean testPathParam() {
true
Expand Down Expand Up @@ -112,6 +117,11 @@ class DropwizardTest extends HttpServerTest<DropwizardTestSupport> implements Ag
}
}

@Override
void responseSpan(TraceAssert trace, int index, Object parent, String method, ServerEndpoint endpoint) {
sendErrorSpan(trace, index, parent)
}

static class TestApp extends Application<Configuration> {
@Override
void initialize(Bootstrap<Configuration> bootstrap) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ public final class JavaxResponseInstrumentationFactory {

public static TypeInstrumentation create() {
return new HttpServletResponseInstrumentation(
BASE_PACKAGE, adviceClassName(".ResponseSendAdvice"));
}

private static String adviceClassName(String suffix) {
return JavaxResponseInstrumentationFactory.class.getPackage().getName() + suffix;
BASE_PACKAGE,
JavaxResponseInstrumentationFactory.class.getPackage().getName() + ".ResponseSendAdvice");
}

private JavaxResponseInstrumentationFactory() {}
Expand Down

0 comments on commit ede08a4

Please sign in to comment.