-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
When using JUnit 5 in Quarkus, then tests annotated with @QuarkusTest can't take advantage of the new Kotlin suspend function support.
Although there is needs to be work on Quarkus as well for this to work, currently progress is blocked by JUnit not detecting the suspend methods and instead skipping the test method with a warning like:
2026-02-13 15:24:22,254 WARNING [org.junit.platform.launcher.core.DiscoveryIssueNotifier] (main) TestEngine with ID 'junit-jupiter' encountered a non-critical issue during test discovery:
(1) [WARNING] @Test method 'public final java.lang.Object org.acme.QuarkusSuspendTest.suspendingTestShouldRun(kotlin.coroutines.Continuation<? super kotlin.Unit>)' must not return a value. It will not be executed.
Source: MethodSource [className = 'org.acme.QuarkusSuspendTest', methodName = 'suspendingTestShouldRun', methodParameterTypes = 'kotlin.coroutines.Continuation']
at org.acme.QuarkusSuspendTest.suspendingTestShouldRun(SourceFile:0)
[INFO]
I am using the latest Quarkus version which brings in JUnit 6.0.2
Steps to reproduce
With the following reproducer:
simply execute mvn test
Reactions are currently unavailable