i am having an issue to understand how can i run all the unit tests in my boot spring application(kotlin) in parallel while the springBootTests and the dataJpaTests will run one after the other(becouse they are failing due to shared context where running in parallel), my application structure is separated to different models and each model have it's unit,springBootTests and dataJpaTets, like this:
-module 1:
unit test 1
unit test 2
data jpa test 1
data jpa test 2
spring boot test1
-module 2:
unit test 1
unit test 2
unit test 3
data jpa test 1
spring boot test1
i used the following properties from https://junit.org/junit5/docs/current/user-guide/#writing-tests-parallel-execution:
junit.jupiter.execution.parallel.enabled = true
junit.jupiter.execution.parallel.mode.default = concurrent //tests in each class run in parallel
junit.jupiter.execution.parallel.mode.classes.default = concurrent //classes run in parallel
but it is not helping becouse there is no way to exclude the springBoot and dataJpa tests from the parallization.
also,i tried to put the @Execution(SAME_THREAD) on all the dataJpa and springBoot test but still the classes itself runed in parallel and test was colliding
*i use --test *test commend to run all the tests together