Ahmed Hamouda
10/03/2024, 8:03 PMorg.gradle.test.worker. So here is the Maven plugin
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
..........
<systemPropertyVariables>
<spring.data.mongodb.database>parties-${surefire.forkNumber}</spring.data.mongodb.database>
</systemPropertyVariables>
</configuration>
</plugin>
My challenge is how to set the spring.data.mongodb.database system property and at the same time use the org.gradle.test.worker to set the value of this property, similar to what Maven is doing with the surefire.forkNumber
I tried systemProperty("spring.data.mongodb.database", "parties-${System.getProperty("org.gradle.test.worker")}") in my test task but no luck. Is there a way to achieve that.Vampire
10/03/2024, 8:46 PMsystemProperty call is evaluated in the daemon process, so there it is not set.
If you want to use that property, you have to set the mongo property from within the test process somehow.Ahmed Hamouda
10/04/2024, 6:03 AMVampire
10/04/2024, 6:44 AMAhmed Hamouda
10/04/2024, 8:08 AM