build.gradle.kts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. muzzle {
  5. pass {
  6. group.set("org.apache.pulsar")
  7. module.set("pulsar-client")
  8. versions.set("[2.8.0,)")
  9. assertInverse.set(true)
  10. }
  11. }
  12. dependencies {
  13. library("org.apache.pulsar:pulsar-client:2.8.0")
  14. testImplementation("javax.annotation:javax.annotation-api:1.3.2")
  15. testImplementation("org.testcontainers:pulsar")
  16. testImplementation("org.apache.pulsar:pulsar-client-admin:2.8.0")
  17. }
  18. tasks {
  19. val testReceiveSpanDisabled by registering(Test::class) {
  20. filter {
  21. includeTestsMatching("PulsarClientSuppressReceiveSpansTest")
  22. }
  23. include("**/PulsarClientSuppressReceiveSpansTest.*")
  24. }
  25. test {
  26. filter {
  27. excludeTestsMatching("PulsarClientSuppressReceiveSpansTest")
  28. }
  29. jvmArgs("-Dotel.instrumentation.messaging.experimental.receive-telemetry.enabled=true")
  30. }
  31. check {
  32. dependsOn(testReceiveSpanDisabled)
  33. }
  34. }
  35. tasks.withType<Test>().configureEach {
  36. // TODO run tests both with and without experimental span attributes
  37. jvmArgs("-Dotel.instrumentation.pulsar.experimental-span-attributes=true")
  38. usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
  39. }