Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DontLoppIndefinitely unittest fails #4

Closed
atifaziz opened this issue Aug 20, 2015 · 2 comments
Closed

DontLoppIndefinitely unittest fails #4

atifaziz opened this issue Aug 20, 2015 · 2 comments

Comments

@atifaziz
Copy link
Owner

Originally reported on Google Code with ID 4

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))

Reported by teh.ekik on 2010-08-11 21:28:29

@atifaziz
Copy link
Owner Author

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!

Reported by teh.ekik on 2010-08-11 21:31:06

@atifaziz
Copy link
Owner Author

Reported by azizatif on 2010-08-12 06:06:52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant