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

Notification

Icon
Error

Tests marked with [ExclusivelyUses] appear to be running concurently
jpoehls
#1 Posted : Friday, February 6, 2015 6:44:23 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/3/2015(UTC)
Posts: 6
Location: United States of America

It appears that my tests are running concurrently even though they are marked as exclusively using the same resource.

I'm basing this assumption on the display of the test runner status and the fact that all the tests switch to 'failed' at the same time, as though running concurrently.

(Note that in that screenshot, the last column is the "Exclusively Used Resources" column.)

Ideas?
Remco
#2 Posted : Friday, February 6, 2015 9:25:18 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, this looks normal, although I agree it isn't intuitive. I'll explain what's happening here.

NCrunch breaks your tests up into batches that are each represented in the processing queue. You'll find that the batches are carefully sized so that longer running tests set to sit in small batches, with faster tests being grouped together. ExclusivelyUsesAttribute also has a role in how the tests are batched, as tests that use this attribute cannot be grouped with other tests that don't make use of it (or use a different resource).

When NCrunch runs your tests, it calls into the test runner once for each batch, executing all tests within the batch then returning the results. NCrunch does not display results for batches that are mid-way through execution. This is done for performance reasons as it is much harder to produce an engine that can interpret all results in real-time without slowing down the overall execution or consuming extra CPU.

In the case of your scenario above, these tests are all in the same batch and are being run in sequence inside the same test runner process. NCrunch has marked them all as 'executing' through the status of their batch, even though it's only possible for one test to be executing within the batch at any one time. As soon as the entire batch has finished, they will be marked as succeeded/failed at the same time.
jpoehls
#3 Posted : Friday, February 6, 2015 9:36:29 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/3/2015(UTC)
Posts: 6
Location: United States of America

Makes sense to me, thanks!
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.029 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download