Enable http pipelining tests for jaxrs-2.0-resteasy (#8425)

This commit is contained in:
Lauri Tulmin 2023-05-05 16:10:08 +03:00 committed by GitHub
parent 32426c8c30
commit fe56784f27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 10 deletions

View File

@ -46,6 +46,7 @@ dependencies {
testInstrumentation(project(":instrumentation:servlet:servlet-3.0:javaagent"))
testInstrumentation(project(":instrumentation:servlet:servlet-javax-common:javaagent"))
testInstrumentation(project(":instrumentation:undertow-1.4:javaagent"))
testImplementation(project(":instrumentation:jaxrs:jaxrs-2.0:jaxrs-2.0-common:testing"))
testImplementation("org.eclipse.jetty:jetty-webapp:9.4.6.v20170531")

View File

@ -33,9 +33,4 @@ class ResteasyHttpServerTest extends JaxRsHttpServerTest<UndertowJaxrsServer> {
boolean shouldTestCompletableStageAsync() {
false
}
@Override
boolean testHttpPipelining() {
false
}
}

View File

@ -44,6 +44,7 @@ dependencies {
testInstrumentation(project(":instrumentation:servlet:servlet-3.0:javaagent"))
testInstrumentation(project(":instrumentation:servlet:servlet-javax-common:javaagent"))
testInstrumentation(project(":instrumentation:undertow-1.4:javaagent"))
testImplementation(project(":instrumentation:jaxrs:jaxrs-2.0:jaxrs-2.0-common:testing"))
testImplementation("org.eclipse.jetty:jetty-webapp:9.4.6.v20170531")

View File

@ -27,9 +27,4 @@ class ResteasyHttpServerTest extends JaxRsHttpServerTest<UndertowJaxrsServer> {
void stopServer(UndertowJaxrsServer server) {
server.stop()
}
@Override
boolean testHttpPipelining() {
false
}
}

View File

@ -5,12 +5,14 @@
package io.opentelemetry.javaagent.instrumentation.undertow;
import static io.opentelemetry.javaagent.extension.matcher.AgentElementMatchers.hasClassesNamed;
import static java.util.Arrays.asList;
import com.google.auto.service.AutoService;
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule;
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
import java.util.List;
import net.bytebuddy.matcher.ElementMatcher;
@AutoService(InstrumentationModule.class)
public class UndertowInstrumentationModule extends InstrumentationModule {
@ -19,6 +21,12 @@ public class UndertowInstrumentationModule extends InstrumentationModule {
super("undertow", "undertow-1.4");
}
@Override
public ElementMatcher.Junction<ClassLoader> classLoaderMatcher() {
// class added in 1.4.0
return hasClassesNamed("io.undertow.Undertow$ListenerInfo");
}
@Override
public List<TypeInstrumentation> typeInstrumentations() {
return asList(