-
Notifications
You must be signed in to change notification settings - Fork 74
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
com.spun.util.FormattedException: Didn't find ... under target/fork_dir_2 when running from maven-surefire-plugin #608
Comments
Not entirely sure how to replicate this as it is currently working on all of our GitHub actions. When we add your workaround it breaks things, so we don't want to do that. We'd be happy to join a call with you to understand the issue better. |
I'll try to replicate in a clean repo. Will reopen if I can reproduce in an isolated fashion. |
Here's a reproduction https://github.com/d-led/reproduce-approvals-bug/actions/runs/12947688141/job/36114785421#step:4:1644 the culprit is the surefire-recommended setting for test run isolation: <workingDirectory>target/fork_dir_${surefire.forkNumber}</workingDirectory> in case parallel execution does get triggered, e.g. via parallelizing test methods <parallel>methods</parallel> ↓ Error: StringRepeaterTest.repeating_once:13 » Formatted Didn't find org.example.examples.StringRepeaterTest under /home/runner/work/reproduce-approvals-bug/reproduce-approvals-bug/target/fork_dir_1
Error: StringRepeaterTest.repeating_twice:18 » Formatted Didn't find org.example.examples.StringRepeaterTest under /home/runner/work/reproduce-approvals-bug/reproduce-approvals-bug/target/fork_dir_1 The setting was set by a parent POM, discovered via |
Fixed in version 24.16.0 Let us know if there is anything else. |
@ScottBob thanks, will check. I guess a dependency needs to be upgraded due to a known CVE: https://mvnrepository.com/artifact/com.approvaltests/approvaltests/24.16.0 |
it seems some other fix is needed. The build is still broken: https://github.com/d-led/reproduce-approvals-bug/actions/runs/13203995838/job/36862663432#step:4:1593 |
Please take a look at d-led/reproduce-approvals-bug#1. Does this address your concern? |
It looks as if it did solve the problem. Will look at it later. Something for the docs? |
Problem
when running approval tests (JUnit5, Java 17) from
mvn test
via themaven-surefire-plugin
, the tests fail withwith maven, approvals and the plugin being latest ones. Earlier surefire plugin versions did not produce an insight into this stacktrace.
In IntelliJ the test run succeeds without any changes. Surefire seems to have a test run isolation feature, enabling the forks which might need a special treatment by approvals.
A work-around which helped me proceed: ↓
Workaround
The text was updated successfully, but these errors were encountered: