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

Notification

Icon
Error

Exclusive-Isolated attribute and GridNode-Serial attribute?
GreenMoose
#1 Posted : Tuesday, November 24, 2015 2:42:19 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 507

Thanks: 145 times
Was thanked: 66 time(s) in 64 post(s)
Hi,

1)
My scenario is:
I tests which exlusively uses "database", and tests testing an http endpoint, only run by remote grid nodes towards my local machine.

So "database" tests can be executed in parallelll on each grid node since the exclusively uses is "per grid node" (right? couldn't actually find if this was the case in documentation) but the http tests must not run in parallell on grid nodes since they end up at the same http endpoint.

Thus the http tests I would like to have ExclusivelyUses("HttpEndpoint"), but that be impacted on solution level, sortof a ExlusivelyUses-Isolated i.e. all tests using "HttpEndpoint" should be run in serial, no matter which grid node is executing them, since they all ends up at same http endpoint.


Is this possible somehow with current version of NCrunch?

2)
I have performance tests which I want to be run on specific grid nodes (RequireCapability usage), but they should not be run along with other tests (to avoid affecting measurements) on the same grid node.
Thus I'm after a sortof "Gridnode-serial" attribute, i.e. other grid nodes should be allowed to continue. Is there a way to do this? Or is the current behavior of existing "Serial" attribute perhaps?

Thanks.
Remco
#2 Posted : Tuesday, November 24, 2015 10:43:00 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1287 time(s) in 1194 post(s)
GreenMoose;8054 wrote:

1)
My scenario is:
I tests which exlusively uses "database", and tests testing an http endpoint, only run by remote grid nodes towards my local machine.

So "database" tests can be executed in parallelll on each grid node since the exclusively uses is "per grid node" (right? couldn't actually find if this was the case in documentation) but the http tests must not run in parallell on grid nodes since they end up at the same http endpoint.

Thus the http tests I would like to have ExclusivelyUses("HttpEndpoint"), but that be impacted on solution level, sortof a ExlusivelyUses-Isolated i.e. all tests using "HttpEndpoint" should be run in serial, no matter which grid node is executing them, since they all ends up at same http endpoint.


Your understanding of the implementation of ExclusivelyUses (and InclusivelyUses) is correct. The scope of this constraint will only apply to the machine that is physically running the test. This means that if you have a grid full of nodes that depend upon a single resource for the entire grid, which cannot be access concurrently, then these mechanisms can't effectively be used to restrict access. The only way I can think of doing this would be to mark a test as being only able to run on a specific node so that the ExclusivelyUses constraint could be applied within a narrow scope. Alternatively, you could look at implementing your own concurrency control feature inside the test, communicating with the client machine to coordinate access (rather painful).

GreenMoose;8054 wrote:

2)
I have performance tests which I want to be run on specific grid nodes (RequireCapability usage), but they should not be run along with other tests (to avoid affecting measurements) on the same grid node.
Thus I'm after a sortof "Gridnode-serial" attribute, i.e. other grid nodes should be allowed to continue. Is there a way to do this? Or is the current behavior of existing "Serial" attribute perhaps?

Thanks.


Under the hood, SerialAttribute is physically implemented using a combination of InclusivelyUses("Test Runner") for the entire queue, and ExclusivelyUses("Test Runner") for the serial tests. This means that the attribute will only apply in the scope of an individual grid node, so using it in combination with RequiresCapabilityAttribute should already give you want you are looking for here :)
1 user thanked Remco for this useful post.
GreenMoose on 11/25/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.036 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download