fix(test): preserve singleton lifecycle samples
Keep one-item endpoint and checkpoint results as arrays under PowerShell strict mode so the uncapped reconnect session is validated by the same gate as the multi-checkpoint capped route.
This commit is contained in:
parent
a4ef57885c
commit
f7b09617c5
1 changed files with 4 additions and 3 deletions
|
|
@ -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)")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue