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

CHEF-4791 Add more windows service states to the start/stop control flow #1166

Merged
merged 2 commits into from Jun 18, 2014

Conversation

deployable
Copy link
Contributor

Add start_pending and stop_pending to the controllalbe list (stopped,started)
Raise exceptions on hitting any other states
Add test's for exceptions on uncontrollable states.
http://msdn.microsoft.com/en-us/library/windows/desktop/ee126211(v=vs.85).aspx

Chef::Log.debug "#{@new_resource} already started - nothing to do"
else
elsif state == START_PENDING
Chef::Log.debug "#{@new_resource} already sent start signal - waiting for start"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitespaces here seems to be off.

@sersut
Copy link
Contributor

sersut commented May 20, 2014

Thanks for spending time on this @deployable.

Other than the whitespace issues, can we add a spec that covers START_PENDING and STOP_PENDING cases so that they don't regress in the future.

I'm 👍

@adamedx can you take a look over this as well?

@deployable
Copy link
Contributor Author

Sorry.. that's not right =/

Fixed deprecation warnings for `stub!` and `mock` in tests.
Added tests for `START_PENDING` and `STOP_PENDING` state to `stop_service` and `start_service`
@deployable
Copy link
Contributor Author

Not sure if you caught that update but I had to reset a commit that accidentally pulled some extra changes in from a rebase... all good now.

White space fixed and some more tests added.

I haven't added a failure test for a service not leaving the start pending or stop pending state as it causes a 60 second * 2 delay in the tests. Without the variable timeouts in #1165 I need do something like mock spawn_command_thread which seems a bit hacky.

@sersut
Copy link
Contributor

sersut commented May 21, 2014

Sweet thanks @deployable. Marked for merge 👍

@sersut sersut added the Windows label Jun 18, 2014
@sersut sersut merged commit 5439694 into chef:master Jun 18, 2014
sersut pushed a commit that referenced this pull request Jun 18, 2014
@thommay thommay added Type: Bug Does not work as expected. Status: Ready for Merge and removed Bug labels Jan 25, 2017
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: Windows Type: Bug Does not work as expected.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants