nunit.analyzers icon indicating copy to clipboard operation
nunit.analyzers copied to clipboard

Warn if timeout is used with a parallelizable test

Open jnm2 opened this issue 5 years ago • 1 comments

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?

jnm2 avatar Sep 23 '18 23:09 jnm2

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.

mikkelbu avatar Sep 24 '18 20:09 mikkelbu