-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
64 lines (55 loc) · 1.75 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
plugins {
id("otel.javaagent-instrumentation")
id("otel.scala-conventions")
}
muzzle {
pass {
coreJdk()
}
}
dependencies {
bootstrap(project(":instrumentation:executors:bootstrap"))
testImplementation(project(":instrumentation:executors:testing"))
testImplementation("org.scala-lang:scala-library:2.11.12")
testCompileOnly(project(":instrumentation:executors:bootstrap"))
testCompileOnly(project(":javaagent-bootstrap"))
}
testing {
suites {
// CompletableFuture behaves differently if ForkJoinPool has no parallelism
val testNoParallelism by registering(JvmTestSuite::class) {
sources {
java {
setSrcDirs(listOf("src/test/java"))
}
}
dependencies {
implementation(project(":instrumentation:executors:testing"))
compileOnly(project(":instrumentation:executors:bootstrap"))
compileOnly(project(":javaagent-bootstrap"))
}
targets {
all {
testTask.configure {
systemProperty("java.util.concurrent.ForkJoinPool.common.parallelism", 1)
}
}
}
}
}
}
tasks {
withType<Test>().configureEach {
// needed for VirtualThreadTest on jdk21
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
jvmArgs(
"-Dotel.instrumentation.executors.include=io.opentelemetry.javaagent.instrumentation.executors.ExecutorInstrumentationTest\$CustomThreadPoolExecutor,io.opentelemetry.javaagent.instrumentation.executors.ThreadPoolExecutorTest\$RunnableCheckingThreadPoolExecutor"
)
jvmArgs("-Djava.awt.headless=true")
jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
}
check {
dependsOn(testing.suites)
}
}