diff --git a/tools/run-connected-world-lifecycle-gate.ps1 b/tools/run-connected-world-lifecycle-gate.ps1 index f4360265..f0c599ef 100644 --- a/tools/run-connected-world-lifecycle-gate.ps1 +++ b/tools/run-connected-world-lifecycle-gate.ps1 @@ -219,11 +219,12 @@ function Invoke-Session( -RedirectStandardOutput $stdout -RedirectStandardError $stderr -PassThru Wait-ForPattern $client $stdout '[UI-PROBE] UI probe script complete' $SessionTimeoutSeconds - $clientPort = @(Get-NetUDPEndpoint -OwningProcess $client.Id -ErrorAction SilentlyContinue | + $clientPorts = @(Get-NetUDPEndpoint -OwningProcess $client.Id -ErrorAction SilentlyContinue | Select-Object -First 1 -ExpandProperty LocalPort) - if ($clientPort.Count -ne 1) { + if ($clientPorts.Count -ne 1) { throw "could not resolve the client's UDP endpoint for ACE disconnect verification" } + $clientPort = [int]$clientPorts[0] $client.Refresh() $processSample = [pscustomobject][ordered]@{ @@ -234,7 +235,7 @@ function Invoke-Session( WindowTitle = $client.MainWindowTitle } - $checkpoints = Read-Checkpoints $timeline + $checkpoints = @(Read-Checkpoints $timeline) if ($checkpoints.Count -ne $ExpectedCheckpoints.Count) { $failures.Add("${Label}: expected $($ExpectedCheckpoints.Count) checkpoints, found $($checkpoints.Count)") }