Skip to content

Commit 196010e

Browse files
committed
Restart-SqlService: Correctly evaluate timeout value
1 parent c780423 commit 196010e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6868
is more correct and not a duplicate.
6969
- Integration tests configuration names was renamed to better tell what
7070
the configuration does ([issue #1880](https://github.com/dsccommunity/SqlServerDsc/issues/1880)).
71+
- SqlServerDsc.Common
72+
- The command `Restart-SqlService` was updated to correctly evaluate when
73+
the timeout value is reached ([issue #1889](https://github.com/dsccommunity/SqlServerDsc/issues/1889)).
7174

7275
## [16.1.0] - 2023-02-28
7376

source/Modules/SqlServerDsc.Common/SqlServerDsc.Common.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ function Restart-SqlService
10301030

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

10351035
$connectTimer.Stop()
10361036

0 commit comments

Comments
 (0)