Skip to content

Restart-SqlService: Correctly evaluate timeout value #1890

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

Merged
merged 1 commit into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
is more correct and not a duplicate.
- Integration tests configuration names was renamed to better tell what
the configuration does ([issue #1880](https://github.com/dsccommunity/SqlServerDsc/issues/1880)).
- SqlServerDsc.Common
- The command `Restart-SqlService` was updated to correctly evaluate when
the timeout value is reached ([issue #1889](https://github.com/dsccommunity/SqlServerDsc/issues/1889)).

## [16.1.0] - 2023-02-28

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ function Restart-SqlService

# Waiting 2 seconds to not hammer the SQL Server instance.
Start-Sleep -Seconds 2
} until ($connectTimer.Elapsed.Seconds -ge $Timeout)
} until ($connectTimer.Elapsed.TotalSeconds -ge $Timeout)

$connectTimer.Stop()

Expand Down