build.gradle.kts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. id("otel.scala-conventions")
  4. }
  5. muzzle {
  6. pass {
  7. coreJdk()
  8. }
  9. }
  10. dependencies {
  11. bootstrap(project(":instrumentation:executors:bootstrap"))
  12. testImplementation(project(":instrumentation:executors:testing"))
  13. testImplementation("org.scala-lang:scala-library:2.11.12")
  14. }
  15. testing {
  16. suites {
  17. // CompletableFuture behaves differently if ForkJoinPool has no parallelism
  18. val testNoParallelism by registering(JvmTestSuite::class) {
  19. sources {
  20. java {
  21. setSrcDirs(listOf("src/test/java"))
  22. }
  23. }
  24. dependencies {
  25. implementation(project(":instrumentation:executors:testing"))
  26. }
  27. targets {
  28. all {
  29. testTask.configure {
  30. systemProperty("java.util.concurrent.ForkJoinPool.common.parallelism", 1)
  31. }
  32. }
  33. }
  34. }
  35. }
  36. }
  37. tasks {
  38. withType<Test>().configureEach {
  39. jvmArgs(
  40. "-Dotel.instrumentation.executors.include=io.opentelemetry.javaagent.instrumentation.executors.ExecutorInstrumentationTest\$CustomThreadPoolExecutor"
  41. )
  42. jvmArgs("-Djava.awt.headless=true")
  43. }
  44. check {
  45. dependsOn(testing.suites)
  46. }
  47. }