vasiliy-vdovichenko / ncrontab

Automatically exported from code.google.com/p/ncrontab
Apache License 2.0
0 stars 0 forks source link

DontLoppIndefinitely unittest fails #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago

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