You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 with mvn clean test -Dgroups=DEBUG it run into a racing condition and throw java.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?
I'm using JDK 17 + Spring boot 3.0.1 with cucumber 7.10.1 and JUnit 5.9.2
mpkorstanje
changed the title
can not run parallel test with Spring boot 3 when provide -Dgroups
Can not run parallel test with Spring boot 3
Jan 27, 2023
mpkorstanje
changed the title
Can not run parallel test with Spring boot 3
Can not run parallel test with Spring boot 3 and AOT
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 .
It's not quite clear to me why -Dgroups=DEBUG is essential to reproducing the problem.
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 <[email protected]>
👓 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: