Skip to content

Commit 8f18c30

Browse files
authored
convert undertow groovy test to java (#12207)
1 parent 2986b57 commit 8f18c30

File tree

7 files changed

+436
-357
lines changed

7 files changed

+436
-357
lines changed

instrumentation/undertow-1.4/javaagent/build.gradle.kts

+8
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,11 @@ dependencies {
2424
tasks.withType<Test>().configureEach {
2525
jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
2626
}
27+
28+
// since 2.3.x, undertow is compiled by JDK 11
29+
val latestDepTest = findProperty("testLatestDeps") as Boolean
30+
if (latestDepTest) {
31+
otelJava {
32+
minJavaVersionSupported.set(JavaVersion.VERSION_11)
33+
}
34+
}

instrumentation/undertow-1.4/javaagent/src/test/groovy/UndertowHttp2ServerTest.groovy

-18
This file was deleted.

instrumentation/undertow-1.4/javaagent/src/test/groovy/UndertowServerDispatchTest.groovy

-111
This file was deleted.

instrumentation/undertow-1.4/javaagent/src/test/groovy/UndertowServerTest.groovy

-228
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
package io.opentelemetry.javaagent.instrumentation.undertow;
7+
8+
import io.undertow.Undertow;
9+
import io.undertow.UndertowOptions;
10+
11+
class UndertowHttp2ServerTest extends UndertowServerTest {
12+
13+
@Override
14+
public void configureUndertow(Undertow.Builder builder) {
15+
builder.setServerOption(UndertowOptions.ENABLE_HTTP2, true);
16+
}
17+
18+
@Override
19+
public boolean useHttp2() {
20+
return true;
21+
}
22+
}

0 commit comments

Comments
 (0)