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
Parallelization control of DynamicNode #2497
Comments
Tentatively slated for 5.8 M1 solely for the purpose of team discussion. |
We have a similar case, but would like to run the first level of dynamic nodes in sequence, but tests under each level can be run in parallel. It would be great to be able to define the |
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. Thank you for your contribution. |
I would still be really interested in a solution to this problem. Are there any thoughts from the team on what a good implementation of a more fine granular "execution-order-control" for dynamic tests could be? Maybe I would give it a try to create a PR, but I only know the codebase as a user. |
Perfectly explained by @big-andy-coates. I have run into the same requirement where I want to run my DynamicContainers in parallel but the DynamicTests within each container sequentially. Is this slated for any upcoming release or is there any other solution to this problem for instance using the Extension model? Any inputs are highly appreciated. |
I wonder if a configuration parameter would really be adequate here. Wouldn't it be better if |
Yep, that's certainly one option. I mentioned in the original text about adding "a parameter to DynamicContainer", though as you note, |
Yes @marcphilipp. Supporting configuration of execution mode for DynamicNode would be ideal. |
@big-andy-coates @niteshhardikar Do you have concrete proposals for that API? I'm reluctant to add more overloads for |
Maybe it's time to introduce a builder pattern, rather than overloading? DynamicContainer.builder("displayName")
.withNodes(iterable)
.withNodes(stream)
.withTestSource(uri)
.withExecutionMode(mode)
.build(); ...and deprecate the old factory methods for removal at the next major version bump. |
The methods in this codebase don't use the This recent PR is also related: #3220 (review) |
Team decision: While we think this is a reasonable request, we'd like to wait for additional interest from the community |
What can the interested community do to move this forward? Are you waiting for a certain number of votes/responses here or how "the interest" is measured? |
Yes, interest is measured in the number of upvotes. |
I have upvoted 👍🏼 for the issue and the use case outlined here: #2497 (comment) |
+1 |
@TestFactory
can return a stream ofDynamicContainers
andDynamicTest
. It would be awesome if we could run containers in parallel, but the tests within containers on the same thread.The
@Execution
seems to only allow you to switch from everything parallel/concurrent or everything on the same thread.The configuration parameters
junit.jupiter.execution.parallel.mode.default
andjunit.jupiter.execution.parallel.mode.classes.default
also don't seem to allow such a configuration, probably because all test suites and test are coming from the sameclass
.For example: the following should allow tests
test1
andtest2
that are insuite1
to be run on the same thread, and the tests insuite2
to be run on a different, but consistent thread:Maybe this could be achieved via one or more of:
junit.jupiter.execution.parallel.mode.container.default
property@TestFactory
to control execution@Execution
DynamicContainer
Thanks!
The text was updated successfully, but these errors were encountered: