Hi Marek, interesting... For Surefire 3.0 we have some stuff in mind to allow users hooking in the surefire logic at several points, one of them being the determination of tests to run and their execution order. I didn't think about that particular case of yours, yet. But good to know.
As for the Junit4 Provider... well that's strange. It's not supposed to eagerly load all the lazy tests, as it disrupts the way forkCount>1 with reuseForks=true is distributing the load among the forks. So: if what you describe is really the case, then I'd say it's a bug. Could you open up a Jira issue for it? [1] Thanks, Andreas [1] Jira: https://jira.codehaus.org/browse/SUREFIRE 2014-11-08 1:32 GMT+01:00 Marek Piechut <[email protected]>: > I’ve got it somewhat working by extending TestsToRun with my > implementation. > Everything is fine, except that surefire loads all test classes before > launching any test just to create test description. > (It’s a JUnit4Provider that’s doing it). > > Do you think it’s safe to omit creation of test description if > TestsToRun.allowEagerReading method returns false? > > > On 07 Nov 2014, at 22:00, Marek Piechut <[email protected]> wrote: > > > > Hi. > > > > I’m trying to modify surefire plugin to make it lazily receive tests > from another host. > > I’ve done a quick look at surefire plugin code and it looks that it > could be done by some variation around LazyTestsToRun. > > Later on I’ve also found TestProvidingInputStream that also looks useful. > > > > Do you have any hint what’s the best way to achieve what I’m trying to > do? > > Any test I can take a look to get better understanding how to do this? > > > > Exact use case below if you have time :) > > > > At my company we have a quite big integration test suite and a Jenkins > cluster that’s launching them. > > We divide all tests to few categories and run each category on separate > node. > > > > What I’ve noticed is that we often have these categories unbalanced (one > machine needs much more time to launch it’s portion of tests while rest is > waiting before whole suite can be finished). From time to time we go trough > these categories and balance them again. Right now it takes around 2 hours > to run all tests. > > > > What I’ve wanted to do is to keep list of tests to run on Jenkins master > and make slaves ask for each test after it finishes previous (using some > simple script that would be sending test class name to client over socket > after request and remove it from list, so another slave gets another test). > This way our suite would be self balancing and would not need any manual > reconfiguration. > > > > Thanks, > > Marek. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
