Build/Test Issues

Failure running tests for NancyFx codebase

Started by sunny on 5,551 views

Hello,
I was preparing a change request for NancyFx framework, when I enabled nCrunch for the solution and found out that many tests fail.

I succeeded to fix some of them using the "Copy referenced assemblies" for these test projects.

Also, there were about 20 tests which were failing b/c of administrative permissions. I tried to fix them using netsh url registration solution.

So, now the tests don't don't fail b/c of no admin access, but rather just hang, and never finish. Event though I disabled parallel execution and set a short timeout, they still hang.

The same tests run well in resharper.

Please, let me know if you need more information.

Cheers,
Sunny
Hi Sunny,

Are you able to get a debugger onto the code before it hangs? NCrunch has no knowledge of the behaviour of Nancy's test code - it will simply call into it. If there is a difference in the behaviour of the code under test, usually you should be able to identify this by debugging through.

There is some history with people using Nancy under NCrunch, so it is possible that there are overrides in place to detect NCrunch and introduce alternative behaviour.

The timeout enforcement by NCrunch and underlying test frameworks is not 100% reliable. The interruptions triggered by timeouts are handled using Thread.Abort, which will not trigger aborts under certain situations. This makes it possible for the execution thread to hang inside some piece of O/S critical code and be unrecoverable without the test process being torn down.

Post a reply

Log in to reply.