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

Notification

Icon
Error

XUnit - CollectionBehaviorAttribute to disable parallelism - not used?
kierenj
#1 Posted : Thursday, June 28, 2018 10:49:19 AM(UTC)
Rank: Member

Groups: Registered
Joined: 8/25/2016(UTC)
Posts: 14
Location: United Kingdom

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
Hi, I have some integration tests which I don't want to be run in parallel, using xunit -

I have :

[assembly: CollectionBehavior(CollectionBehavior.CollectionPerAssembly, DisableTestParallelization = true, MaxParallelThreads = 1)]

Which works fine with most runners, but it seems that NCrunch doesn't pick up on it - is that by design?

Thanks!
Kieren
Remco
#2 Posted : Thursday, June 28, 2018 11:24:31 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 5,374

Thanks: 705 times
Was thanked: 878 time(s) in 835 post(s)
Hi Kieren,

Thanks for posting!

Yes, this is by design. The dimensions of the Xunit parallelization control are quite different to NCrunch's own implementation, so there is no way for NCrunch to make use of them. To constraint parallel execution under NCrunch you'll need to use ExclusivelyUsesAttribute or Allow Parallel Execution.
1 user thanked Remco for this useful post.
kierenj on 7/3/2018(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.021 seconds.