Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Allow to run the tests on the grid node while the foreground solution is still compiling
Ralf Koban
#1 Posted : Tuesday, June 9, 2015 3:08:00 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/19/2014(UTC)
Posts: 44
Location: Germany

Thanks: 4 times
Was thanked: 10 time(s) in 9 post(s)
Hi Remco,

this is a follow-up on your comment on my feature request on UserVoice.

I'm not sure whether to place it here and whether this is an issue at all or more a feature request.

Seems that I found out what's causing the wait I mentioned. It's not the grid that seems to run fine (as expected), it's my local machine.
When I trigger a re-build on my machine, then NCrunch is pausing the local processing queue until the build completed.
As the tests are distributed over the grid and some are also running locally, all tests that are planned to run locally are waiting until build completion.

It would be nice if those tests would be removed from the local processing queue and instead get distributed over the grid (if there are some free grid nodes asking for tests).


Best regards,
Ralf
Remco
#2 Posted : Tuesday, June 9, 2015 7:54:23 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi Ralf,

Thanks for coming back to the forum on this one. I'd just like to clarify my understanding of what you're describing to make sure I understand this completely.

When a test exists in the processing queue, it can optionally be assigned to a server for execution. The effect of this is visible under the 'Server' column inside the processing queue window. If a test hasn't started executing yet and isn't assigned to a server, this field will be null. If it has started executing, this field will always be set to the server that is executing it.

... So this means that if you have a test that is marked to run locally (perhaps by right-clicking the test and choosing to execute it locally), then the test will not be able to execute until all relevant builds on the local machine have succeeded. This is because the NCrunch has been told to run the test only locally, and therefore will keep it off-grid.

This behaviour is different when compared to tests that are queued without a specific server, which will be executed by any machine on the grid that has completed the necessary builds.

So if what you're observing is that you have unprocessed tests in the processing queue marked to run locally only and the local queue is waiting for builds before running them, then this is behaviour as designed. The key thing to look for is the value under the 'Server' column in the processing queue ... if this field is null, then the tests should be able to run over the grid as soon as any of the nodes requests them from the queue.

If everything I've written above makes sense in your case, and you are asking that tests should be distributed when they are queued for local execution, I may need a bit more clarification on how these tests are being added to the queue and what your intentions are in this regard.
Ralf Koban
#3 Posted : Wednesday, June 10, 2015 7:29:08 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/19/2014(UTC)
Posts: 44
Location: Germany

Thanks: 4 times
Was thanked: 10 time(s) in 9 post(s)
Hi Remco,

NCrunch is set up to run all tests automatically. So it seems to happen that there are tests which are queued already in the processing queue to run locally but are not yet started when I start to compile.

What I'm doing is following:
- Open the solution
- Wait until NCrunch has analyzed my solution/loaded the cached data (so actually, I wait until the spinner in the bottom-right corner switches from blue to green).
- Start a re-build in VS via "Build" -> "Rebuild solution"

As I do not have explicitely set the tests to run locally it looks like some kind of corner case.

What I would like to get is:
If I trigger a re-build and some of my tests are pending to get executed locally (because NCrunch decided that by it's own, so I did not decide that via "Run locally"), but the local queue is pending to wait for completion, then it would be nice if the other grid nodes could just pick-up those tests and run them in the meantime (as my compilation will take several minutes and the tests are expected to finish much earlier).

The intention behind that is simply to get feedback asap. whether some tests are broken, without having to wait until the compilation finishes.


Best regards,
Ralf
Remco
#4 Posted : Wednesday, June 10, 2015 7:39:01 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Ralf Koban;7415 wrote:

- Start a re-build in VS via "Build" -> "Rebuild solution"


Gotcha - Sorry, I thought you were referring to an NCrunch build, rather than a VS one.

Looking at the code involved, there doesn't seem to be anything that would stop a grid node from picking up work from the processing queue while the engine is 'paused waiting for VS'. I've just done a quick test on this time and can confirm that the grid does still seem to continue to process tasks while the local engine is waiting for VS to do its thing.

I believe, however, that there is an exception to this behaviour. The local processor can still pick up tasks while VS is building - it just can't process them. This means that if you have a local processor with fairly high capacity, then it'll pick up the tasks and sit on them until VS has finished .. meanwhile denying grid nodes the chance to process them. I assume that this is the probably the exact situation you are being hit with. I'll make a note to see if I can improve how the engine handles this situation .. perhaps it would be possible to stop it from picking up any tasks until VS has finished its foreground build.
Ralf Koban
#5 Posted : Wednesday, June 10, 2015 11:00:52 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/19/2014(UTC)
Posts: 44
Location: Germany

Thanks: 4 times
Was thanked: 10 time(s) in 9 post(s)
Hi Remco,

yes, that exceptional situation seems to be the situation I'm faced with (my local processor has a capacity of 12 tasks where 3 are used as fast-lane tasks).

It would be nice if the NCrunch engine could be improved to handle that.
Could be as you've said to not picking up tasks, or maybe (I don't know the internals) that the local processor somehow releases/discards the already picked up tasks back into the processing queue so that some other processor can process them.
1 user thanked Ralf Koban for this useful post.
Remco on 6/10/2015(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.053 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download