-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Can not run parallel test with Spring boot 3 and AOT #2686
Comments
7 tasks
In brief, the problem is that invoking It's not quite clear to me why |
mpkorstanje
added a commit
that referenced
this issue
Jan 27, 2023
In brief, the problem is that invoking `new TestContextManager(someContextConfiguration)` for identical instances of someContextConfiguration is not actually thread-safe. Spring caches the configuration derived from `someContextConfiguration` and when AOT is used, will fail to apply idempotent updates configuration. Fixes: #2686 Co-authored-by: M.P. Korstanje <rien.korstanje@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👓 What did you see?
Please refer to this Sample Github Repo
When I run the test in parallel with
mvn clean test
without provide the -Dgroups for maven surefire plugins, the test is run smoothly, but when I do. running the test withmvn clean test -Dgroups=DEBUG
it run into a racing condition and throwjava.lang.IllegalArgumentException: AOT attributes cannot be overridden. Name '[org.springframework.boot.test.context.SpringBootTestContextBootstrapper.SpringBootConfiguration.com](http://org.springframework.boot.test.context.springboottestcontextbootstrapper.springbootconfiguration.com/).mdaq.testing.api.ApplicationTests' is already in use.
✅ What did you expect to see?
The test can run in parallel when providing tags
📦 Which tool/library version are you using?
🔬 How could we reproduce it?
Sample Github Repo
Steps to reproduce the behavior:
clone the sample github repo
run
mvn clean test -Dgroups=DEBUG
couple of time and the issue will show up📚 Any additional context?
This text was originally generated from a template, then edited by hand. You can modify the template here.
The text was updated successfully, but these errors were encountered: