nunit.analyzers
nunit.analyzers copied to clipboard
Warn if timeout is used with a parallelizable test
Had the idea after reading https://github.com/nunit/nunit/commit/6be37033ea65f15bd7267aa841a1abb47f6353da#commitcomment-30439403.
If TimeoutAttribute is used on a test that is allowed to run in parallel, it can exacerbate the unreliable nature of timing-based tests when the CPU is under load. What do you think?
Sounds like a good idea. I haven't used parallel execution of tests much, so I'm a bit on unknown territory, but it seems that one can figure out if an assembly, testfixture, or test is a candidate to be run in parallel by examine the Parallelizable
and NonParallelizable
attributes (and innermost attribute wins).
Perhaps it will be possible to share parts of the implementation with with #64.