I'm using JUnit 5 in a Kotlin project and observing behavior that does not match the documentation.
When using multiple @ExtendWith
annotations on a test class I receive the following error:
Repeatable annotations with non-SOURCE retention are not yet supported
In the Extension
section of the JUnit documentation this is listed as a valid option.
I'm using Kotlin 1.3.10 and JUnit 5.3.2
Why am I unable to repeat the @ExtendWith
annotation on my test classes?
Repeatable annotations are not yet supported in Kotlin. You can, however, use the Extensions annotation:
@Extensions(
ExtendWith(...),
ExtendWith(...)
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With