-
-
Notifications
You must be signed in to change notification settings - Fork 7
Return unresolved when tests not found during discovery #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Michał Dębski.
|
Hi @Neos3452, we require contributors to sign our Contributor License Agreement, and we don't have yours on file. In order for us to review and merge your code, please access https://www.artima.com/cla/choose-type to sign our Contributor License Agreement. Your effort is highly appreciated. Thank you. |
Done |
@cla-bot[bot] check |
The cla-bot has been summoned, and re-checked this pull request! |
@Neos3452 Sorry for the late response, when I tried to compile the changes I got the following error:
We still need to support jdk8 for now, do you mind updating PR so that it works with jdk8? Other than that I think the changes looks good to go. |
switch my jdk to 8 and fixed the compile error. I also noticed that sbt disables scala engine (I ran test via IDE) so I clear the property for the duration of those specific tests. |
We have a project that has both java and scala tests in a multimodule maven project and we use junit5 to run all of them. We also use IntelliJ and this causes problems. When running tests on a whole module the ScalaTestEngine fails with an error at the bottom. As you can see it tries to discover tests using classpath root and IntelliJ, besides a test classes path adds a normal classes path. Obviously, there are no tests to discover there so when
Resolution.matches
is called at the end ofresolve
with an empty set it fails an assertion. Looking at other code for junit test engines it seems it should returnResolution.unresolved()
to indicate that nothing was found. (see https://junit.org/junit5/docs/current/api/org.junit.platform.engine/org/junit/platform/engine/SelectorResolutionResult.Status.html).To fix it I just applied a simple condition to check if the results are empty and return
unresolved
in such a case. I have also reduced log verbosity since it logs something that looks like debugging messages (at least I found it superfluous when they appeared in my test logs).