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

Notification

Icon
Error

Stalled Engine
DanHil
#1 Posted : Wednesday, November 14, 2012 2:33:07 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 11/12/2012(UTC)
Posts: 85

Thanks: 11 times
Was thanked: 3 time(s) in 3 post(s)
Hi Remco,

in the past 15 minutes the NCrunch engine stalled two times.
There were several processes in the processing queue with status "Processing". However, they never finished. I waited over five minutes both times. Those tests normally finished in seconds.

I uploaded two bug reports for you to check:
http://rapidshare.com/fi...eport_StalledEngine.zip
http://rapidshare.com/fi...port_StalledEngine2.zip

Regards,

Daniel
DanHil
#2 Posted : Wednesday, November 14, 2012 2:55:57 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 11/12/2012(UTC)
Posts: 85

Thanks: 11 times
Was thanked: 3 time(s) in 3 post(s)
I just found out that it was actually one of my integration tests that was hanging because of a database lock that has not been released by a previous test.

It would be nice to have a fifth icon in the toolbar for "Show executing tests".
And maybe a way to cancel a specific test.

BTW: It seems to currently be impossible to see which test is really currently executing. I have 9 tests that have the status "Running", but only one of them can actually execute currently as they have all the same ExclusivlyUses attribute.

BTW: It looks like there is a problem with the timeout feature. I set the timeout to 6000 but still, no tests time out.
Remco
#3 Posted : Wednesday, November 14, 2012 8:07:00 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi Dan,

Database transactions/locks are a common cause of tests hanging - especially under parallel execution. I'm hoping to improve some of the mechanics around the test runner to make these situations easier to analyse and control, with much of what you've suggested already part of the plan for future features.

Right now NCrunch 'batches' faster running tests together to reduce the overhead of needing to process results from every independent test in real-time. This has certain performance advantages, but it's rather messy when you have fast running integration tests that are unstable (as you've described). The tests will still be executed sequentially when they exist as part of the same task, but visibility on what is happening is currently very limited.

The timeout itself is controlled by ThreadAbortExceptions that occur on the test runner thread. It's been found that in certain circumstances (particularly around database locks and transactions), ThreadAbortExceptions do not behave timely and the test often still waits for the lock to clear. I'm hoping to improve this in future with more vigorous enforcement (i.e. by terminating the entire test process).

Thanks for your feedback!


Cheers,

Remco
1 user thanked Remco for this useful post.
DanHil on 11/14/2012(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.030 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download