Skip to content

Commit

Permalink
Convert jaxrs-1.0 tests to java (#12745)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit authored Nov 19, 2024
1 parent 5b21872 commit 059a4ca
Show file tree
Hide file tree
Showing 8 changed files with 316 additions and 285 deletions.
15 changes: 11 additions & 4 deletions instrumentation/jaxrs/jaxrs-1.0/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,19 @@ dependencies {

compileOnly("javax.ws.rs:jsr311-api:1.1.1")

// Jackson, used by the test, dropped support for jax 1.x in 2.13+
testImplementation(enforcedPlatform("com.fasterxml.jackson:jackson-bom:2.12.6"))
testImplementation("io.dropwizard:dropwizard-testing:0.7.1")
testImplementation("javax.xml.bind:jaxb-api:2.2.3")
testInstrumentation(project(":instrumentation:jetty:jetty-8.0:javaagent"))

testImplementation("org.eclipse.jetty:jetty-webapp:9.4.6.v20170531")
testImplementation("com.sun.jersey:jersey-servlet:1.19.4")
testImplementation("javax.xml.bind:jaxb-api:2.2.11")
testImplementation("com.sun.xml.bind:jaxb-core:2.2.11")
testImplementation("com.sun.xml.bind:jaxb-impl:2.2.11")
testImplementation("javax.activation:activation:1.1.1")
}

tasks.withType<Test>().configureEach {
jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
// required on jdk17
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@

public final class JaxrsSingletons {

public static final String ABORT_FILTER_CLASS =
"io.opentelemetry.javaagent.instrumentation.jaxrs2.filter.abort.class";
public static final String ABORT_HANDLED =
"io.opentelemetry.javaagent.instrumentation.jaxrs2.filter.abort.handled";

private static final String INSTRUMENTATION_NAME = "io.opentelemetry.jaxrs-1.0";

private static final Instrumenter<HandlerData, Void> INSTRUMENTER;
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

package io.opentelemetry.javaagent.instrumentation.jaxrs.v1_0;

import javax.ws.rs.GET;
import javax.ws.rs.Path;

Expand Down
Loading

0 comments on commit 059a4ca

Please sign in to comment.