Thanks Enrico for replying. reuseFork = true is applicable only for a module? I mean same surefire forked JVM will not be used for another maven module in a multimodule project. Is it correct?
On Tue, Jun 7, 2022 at 7:22 PM Enrico Olivelli <eolive...@gmail.com> wrote: > Debraj, > each module is running surefire independently. > I hope that this explains the behavior you are seeing > > > Enrico > > Il giorno mar 7 giu 2022 alle ore 15:28 Debraj Manna > <subharaj.ma...@gmail.com> ha scritto: > > > > I have asked the same in stackoverflow > > < > https://stackoverflow.com/questions/72515006/maven-3-8-difference-between-thread-count-and-forkcount-for-suitsandclasses-para > > > > also. Any one any thoughts? > > > > On Mon, Jun 6, 2022 at 7:25 PM Debraj Manna <subharaj.ma...@gmail.com> > > wrote: > > > > > I read the link > > > < > https://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html > > > > > . > > > > > > For parallel = classes, mvn test -T 5 , reuseForks = true & forkCount > = 2 > > > maven will build and run 5 modules in parallel. During the test phase > of > > > each module surefire is getting called and surefire is spawning 2 JVM > to > > > distribute the tests. Once all the tests are finished in module > surefire > > > fork will be termintated. Again a new surefire fork will be created for > > > executing tests in another module. Only for a module, surefire fork > will be > > > reused. Is my understanding correct? > > > > > > What happens for suitesAndClasses? How are the tests distributed? > > > > > > > > > > > > On Mon, Jun 6, 2022 at 1:19 PM Debraj Manna <subharaj.ma...@gmail.com> > > > wrote: > > > > > >> Hi > > >> > > >> I am having a surefire configuration like below > > >> > > >> <configuration> > > >> <forkCount>2</forkCount> > > >> <reuseForks>true</reuseForks> > > >> <perCoreThreadCount>false</perCoreThreadCount> > > >> <parallel>suitesAndClasses</parallel> > > >> </configuration> > > >> > > >> In a multimodule maven project if I am executing mvn test -T 5 then > how > > >> does parallelism work here? Will it be that in surefire fork1 5 tests > > >> classes will be running in parallel and same in fork2? > > >> > > >> Maven Version 3.8.4 > > >> Surefire version 3.0.0-M6 > > >> > > >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >