vasiliy-vdovichenko / ncrontab

Automatically exported from code.google.com/p/ncrontab

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DontLoppIndefinitely unittest fails

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
1. Run the unittests in NCrontab 0.2 without debugger attached.
2. DontLoppIndefinitely will fail.

Expected results:
DontLoppIndefinitely test should pass

Actual results:
The test fails with the message "The test did not complete in the allocated 
time".

Suggested fix:
Issue is in NCrontab.Tests.CrontabSchduleTests:256:
if (worker.Join(!Debugger.IsAttached ? limit.Milliseconds : Timeout.Infinite))
since Milliseconds only contains the fractional number of milliseconds (< 
1000). You would probably want something like:
if (worker.Join(!Debugger.IsAttached ? (int)limit.TotalMilliseconds : 
Timeout.Infinite))

Original issue reported on code.google.com by teh.e...@gmail.com on 11 Aug 2010 at 9:28

  • Merged into: #2
Sorry about this, didn't notice that google code by default didn't show all 
issues. I can see that this has already been fixed.

Thank you for a nicely written crontab parser!

Original comment by teh.e...@gmail.com on 11 Aug 2010 at 9:31

Original comment by azizatif on 12 Aug 2010 at 6:06

  • Changed state: Duplicate