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

Notification

Icon
Error

Stack overflow / infinite runtime of a test causes NCrunch 1.33b to fail
alexnorcliffe
#1 Posted : Sunday, September 11, 2011 12:16:31 PM(UTC)
Rank: Member

Groups: Registered
Joined: 9/2/2011(UTC)
Posts: 23

Thanks: 1 times
Was thanked: 5 time(s) in 5 post(s)
Great work on 1.33b, massive improvement!
If a test causes a stack overflow, or just never returns, the NCrunch runner never returns either.
Clicking the 'Reset' button in the Tests panel, or Disabling / Enabling NCrunch from the VS menu, appears to cancel the test run as the tool panels get cleared, but NCrunch never recovers and a VS restart is the only fix.

Would be great to have two things:
- A "stop" button for currently running tests
- A "timeout" configuration for test projects at which point the test runner abandons the test and marks it as a failure

p.s. Obviously the test was covering flawed code, but it would be nice to be able to test for a stack overflow ;)
alexnorcliffe
#2 Posted : Sunday, September 11, 2011 5:07:15 PM(UTC)
Rank: Member

Groups: Registered
Joined: 9/2/2011(UTC)
Posts: 23

Thanks: 1 times
Was thanked: 5 time(s) in 5 post(s)
I reckon I've spotted a part of the prob: I was running the tests in linear fashion, now that I've switched to running tests in parallel NCrunch does appear to kill the recursive test eventually and recover.
Remco
#3 Posted : Sunday, September 11, 2011 8:44:05 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
I believe even without the parallel execution, NCrunch should be able to recover from a stack overflow ... but the queue will likely seize up on the batch of tests that contains the offender. If you carry on coding (after fixing the stack overflow), everything should just carry on as usual. In fact, the most annoying part of the stack overflow is simply the fact that it throws a message up on the screen .. when it would be much better for the test to just fail instead :)

You'll also notice that timeouts are built into NCrunch. Have a look at test timeouts.
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.032 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download