[ticket/16939] Wait for postgresql service to start on windows CI runners

PHPBB3-16939
This commit is contained in:
Marc Alexander 2021-12-12 09:16:51 +01:00
parent ec75f1741b
commit 710aa10905
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

@ -554,8 +554,11 @@ jobs:
run: |
$postgreSqlSvc = Get-Service "postgresql*"
Set-Service $postgreSqlSvc.Name -StartupType manual
$runningStatus = [System.ServiceProcess.ServiceControllerStatus]::Running
$maxStartTimeout = New-TimeSpan -Seconds 30
try {
$postgreSqlSvc.Start()
$postgreSqlSvc.WaitForStatus($runningStatus, $maxStartTimeout)
} catch {
$_ | select *
}