JUnit: populate sbt.testing.Event.throwable and duration.#4320
Conversation
…duration`. If a Throwable associated with the test event is available, bubble it up through the SBT's test interface using the slot dedicated to just such information: `sbt.testing.Event.throwable`. If duration associated with the test event is available, bubble it up through the SBT's test interface using the slot dedicated to just such information: sbt.testing.Event.duration; if duration is not available, populate the slot with `0`. It seems a shame to throw away information that is literally in our hands; also, this change: - simplifies integration with runners that assume that test failure is always accompanied by a `Throwable` (e.g., Gradle) and - avoids weird-looking negative duration values in test reports.
|
@dubinsky Thanks for this work. I followed your work in Scala.js and was hoping you would make it this way :-) |
Thank you for the encouragement, @ekrich ! I appreciate it a lot! What do I need to do for this to get merged? My Gradle Plugin now supports building and testing Scala Native code, and it would be nice to be able to drop work-arounds for the JUnit4 for Scala Native ;) Thank you! |
|
@WojciechMazur Is super good about reviewing and merging - he is planning to make a release later this week or early next week so I am pretty sure this can get merged especially since this has already went through the Scala.js process. |
Fantastic, thank you! |
|
dubinsky As an individual contributor I thank you for all the recent typo fixes, in many files. |
Thank you for your kind words! |
If a Throwable associated with the test event is available, bubble it up through the SBT's test interface using the slot dedicated to just such information:
sbt.testing.Event.throwable.If duration associated with the test event is available, bubble it up through the SBT's test interface using the slot dedicated to just such information: sbt.testing.Event.duration; if duration is not available, populate the slot with
0.It seems a shame to throw away information that is literally in our hands; also, this change:
Throwable(e.g., Gradle) andFYI: this issue was ported to Scala Native from Scala.js, as it was to MUnit; it has been fixed in both: scala-js/scala-js#5132, scala-js/scala-js#5134, scalameta/munit#918.