Skip to content

Commit

Permalink
Restart-SqlService: Correctly evaluate timeout value (#1890)
Browse files Browse the repository at this point in the history
- SqlServerDsc.Common
  - The command `Restart-SqlService` was updated to correctly evaluate when
    the timeout value is reached (issue #1889).
  • Loading branch information
johlju authored Mar 28, 2023
1 parent c780423 commit 4c98dda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
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

0 comments on commit 4c98dda

Please sign in to comment.