Skip to content
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

Parallel execution of JUnit micronaut tests not working from 3.6.0 #625

Open
jorgesantos-osp opened this issue Aug 10, 2022 · 5 comments
Open

Comments

@jorgesantos-osp
Copy link

Expected Behavior

All tests passed with parallel execution turned on

Actual Behaviour

Test suites passed when executed sequentially but not when parallel execution is turned on

Steps To Reproduce

First check that tests passed when executed without any other concurrent test:
./gradlew clean test --tests com.example.ControllerTest

Running all @MicronautTest concurrently:
./gradlew clean test

> Task :test FAILED

ControllerTest > testControllerA() FAILED
    io.micronaut.http.client.exceptions.HttpClientResponseException at DefaultHttpClient.java:3478

2 tests completed, 1 failed

Environment Information

MacOS
Java 17

Example Application

https://github.com/jorgsant/micronaut-parallel-test.git

Version

3.6.0

@vnesek
Copy link

vnesek commented Aug 29, 2022

Workaround, add to gradle.properties:

org.gradle.parallel=false

@jorgesantos-osp
Copy link
Author

Workaround does not work for me.
Only workaround does work is disabling parallelization at junit level.
Besides it is still failing in micronaut 3.6.2

@graemerocher
Copy link
Contributor

Don't think we have ever supported parallel execution with Junit

@jorgesantos-osp
Copy link
Author

It is weird because with versions previous to 3.6.0 works

@PiotrDuz
Copy link

You can always fork JVM's using surefire

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants