Skip to content

Commit

Permalink
fix bad exit errorcode
Browse files Browse the repository at this point in the history
  • Loading branch information
parvit committed Aug 25, 2024
1 parent 0c635cb commit f0374e8
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/run-performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,32 @@ jobs:
run: |
${{ github.workspace }}/docker/speedtests/utils/windows-kill.exe -SIGINT @(Get-Process qpep | select -expand id)
- name: Wait Client Stop
if: always()
shell: pwsh
continue-on-error: true
run: |
$Stoploop = $false
[ int ]$MaxRetries = "60"
do {
try {
Get-Process qpep -ErrorAction Stop | select -expand id | out-null
$id = Get-Process qpep -ErrorAction Stop | select -expand id
Write-Host "QPep client still active with pid ${id}, wait 1sec..."
$Retrycount = $Retrycount - 1
Start-Sleep -Seconds 1
Write-Host "QPep client still active, wait 1sec..."
}
catch {
$Stoploop = $true
Write-Host "QPep client stopped"
}
if ($Retrycount -lt 0){
Write-Error "Could not get stop client after $MaxRetries retries, forcing stop."
$Stoploop = $true
Get-Process qpep | Stop-Process
}
}
While($Stoploop -eq $false)
Expand Down

0 comments on commit f0374e8

Please sign in to comment.