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

Restart-SqlService: Evaluates wrong property for total seconds #1889

Closed
johlju opened this issue Mar 28, 2023 · 0 comments · Fixed by #1890
Closed

Restart-SqlService: Evaluates wrong property for total seconds #1889

johlju opened this issue Mar 28, 2023 · 0 comments · Fixed by #1890
Labels
bug The issue is a bug.

Comments

@johlju
Copy link
Member

johlju commented Mar 28, 2023

The first issue led me to the second issue which is with the Stopwatch timer. The intention is that the loop end after 120 seconds, assuming the default timeout value, but it's not because the control statement is incorrect. The loop control should be looking at TotalSeconds not Elapsed.Seconds because Elapsed.Seconds will never be greater than 60.

Confirmed. Good catch! I will create a separate issue for this.

Originally posted by @johlju in #1888 (comment)

@johlju johlju added bug The issue is a bug. in progress The issue is being actively worked on by someone. labels Mar 28, 2023
johlju added a commit that referenced this issue Mar 28, 2023
- SqlServerDsc.Common
  - The command `Restart-SqlService` was updated to correctly evaluate when
    the timeout value is reached (issue #1889).
@johlju johlju removed the in progress The issue is being actively worked on by someone. label Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant