Closed as not planned
Description
Steps to reproduce
- Make class with a JUnit
@Test
that doesn't returnvoid
- Try to run all tests
- Have it be reported that no tests were found
Context
Following a multi-day investigation and discussion with the Redhat/Quarkus team at:
No tests were found
when trying to run JUnit tests with Scala 2 or WIP Scala 3 extension quarkusio/quarkus#18373- https://quarkusio.zulipchat.com/#narrow/stream/187038-dev/topic/.22No.20Tests.20Found.22.2C.20last.20issue.20for.20Scala.203.20support
The confusion
The resolution
- (Add
: Unit
to function signature to have it generatevoid
as return type in bytecode)
Deliverables
Please would it be possible to either:
- Make JUnit tests accept
@Test
that return things besidevoid
, potentially just disregarding the return type - Issue a VERY LARGE, blatant error/warning message when
No tests were found
that JUnit only resolves@Test
methods of typevoid
. Something likeNo tests returning type "void" were found. JUnit only resolves tests of type "void".