You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Could not get test method warnings with munit #8441
When running munit (scala) tests I'm getting a lot of warnings like these:
[dd.trace 2025-02-24 16:19:32:097 +0000] [io-compute-0] WARN datadog.trace.instrumentation.junit4.JUnit4Utils - Could not get test method
java.lang.NoSuchMethodException: com.example.Test.Name of test()
at java.base/java.lang.Class.getMethod(Class.java:2395)
at datadog.trace.instrumentation.junit4.JUnit4Utils.getTestMethod(JUnit4Utils.java:139)
at datadog.trace.instrumentation.junit4.JUnit4Utils.toTestIdentifier(JUnit4Utils.java:297)
at munit.MUnitRunner.runTest(MUnitRunner.scala:269)
at munit.MUnitRunner.runTests$$anonfun$1(MUnitRunner.scala:135)
at scala.collection.Iterator$$anon$9.next(Iterator.scala:584)
at munit.MUnitRunner.loop$1(MUnitRunner.scala:150)
at munit.MUnitRunner.sequenceFutures(MUnitRunner.scala:163)
at munit.MUnitRunner.runTests(MUnitRunner.scala:135)
at munit.MUnitRunner.runAll$$anonfun$1(MUnitRunner.scala:183)
at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:470)
at cats.effect.unsafe.WorkerThread.run(WorkerThread.scala:743)
I guess because munit tests don't correspond to actual methods.
The test result seems visible in datadog.
Expected Behavior
No warnings.
Reproduction Code
packagecom.exampleimportmunit.CatsEffectSuiteclassTestextendsCatsEffectSuite {
test("Name of test") {}
}
Activity
nikita-tkachenko-datadog commentedon Feb 25, 2025
Hi @mwisnicki, thank you for reporting this! The fix will be included in the upcoming DD Java tracer release scheduled for March, 3rd
github-actions commentedon Mar 5, 2025
🤖 This issue has been addressed in the latest release. Check full details in the Release Notes.