Slackbot
02/07/2024, 9:32 AMephemient
02/07/2024, 9:37 AM--max-workers
could helpephemient
02/07/2024, 9:37 AMephemient
02/07/2024, 9:39 AMCristianGM
02/07/2024, 9:44 AMJendrik Johannes
02/08/2024, 6:48 AM--max-workers
is not hepful IMO.
If you already parallelize the tests through JUnit, using an empty build service with maxParallelUsages = 1
to limit how many test tasks run in parallel sounds like a good solution (we do that). And also keep maxParallelForks
at 1 so that there is only one worker per test task.CristianGM
02/08/2024, 8:44 AMCristianGM
02/08/2024, 8:45 AMCristianGM
02/08/2024, 8:47 AMmaxParallelForks=8
but using a single worker for tests
⢠using 8 workers, but keeping maxParallelForks=1
CristianGM
02/08/2024, 8:48 AMephemient
02/08/2024, 8:50 AMJendrik Johannes
02/08/2024, 10:27 AMI believe it will become very painful when Gradle enables CC by defaultI think that will mostly happen to folks who did not activate "parallel" before as well. But for those there might be other surprises as well.
probably depends on project structure in practiceYes. having seen a bunch of different projects in the past months, this is my experience. It depends a lot how you are testing and what tests are doing. I think this is to a large degree also a documentation and usability issue. I think like 90% of the users do not understand the different layers of parallelization: multiple tasks, one task with multiple worker VMs, multiple threads in a VM by JUnit5 parallelization, tests creating multiple threads themselves, tests starting additional processes themselves And this is also too complex to "just work". You can maybe improve some things in Gradle but it will never be able to automatically figure out what the best parallelization for your setup ist. Plus there is the issue of different contexts: Sometimes you want to use as much machine power as possible (CI agents). And sometimes you want to run it in the background and only use half of your machine (run all the tests in the background without making my laptop feel slow while I am in a Zoom call)
CristianGM
02/08/2024, 10:32 AM--no-parallel
precisely to handle the memory issue, but you are right.
Multiple layers of parallelization + not well documented (tracking memory usage is not good either from gradle side).
I agree it's complex, the question is how to help reducing the frictionCristianGM
02/08/2024, 10:53 AMmelix
02/09/2024, 7:12 AMmelix
02/09/2024, 7:13 AMmelix
02/09/2024, 7:15 AMCristianGM
02/09/2024, 7:18 AMmelix
02/09/2024, 7:24 AMmelix
02/09/2024, 7:25 AMmelix
02/09/2024, 7:27 AMmelix
02/09/2024, 7:27 AMmelix
02/09/2024, 7:28 AMCristianGM
02/09/2024, 7:30 AM