diff --git a/tests/AcDream.App.Tests/Diagnostics/ConnectedR6SoakContractTests.cs b/tests/AcDream.App.Tests/Diagnostics/ConnectedR6SoakContractTests.cs index 84061a32..81597771 100644 --- a/tests/AcDream.App.Tests/Diagnostics/ConnectedR6SoakContractTests.cs +++ b/tests/AcDream.App.Tests/Diagnostics/ConnectedR6SoakContractTests.cs @@ -351,6 +351,13 @@ public sealed class ConnectedR6SoakContractTests "RuntimeCounters = if (-not $SkipRuntimeCounters) { $runtimeCounters } else { $null }", source, StringComparison.Ordinal); + AssertAppearsInOrder( + source, + "Wait-ForLogPattern $process $stdoutLog 'live: in world'", + "if (-not $SkipRuntimeCounters) {", + "Start-Process -FilePath 'dotnet-counters'", + "if ($CaptureContention) {", + "Start-Process -FilePath 'dotnet-trace'"); } [Fact] diff --git a/tools/run-connected-r6-soak.ps1 b/tools/run-connected-r6-soak.ps1 index 2a010232..774c4496 100644 --- a/tools/run-connected-r6-soak.ps1 +++ b/tools/run-connected-r6-soak.ps1 @@ -685,6 +685,11 @@ try { -RedirectStandardOutput $stdoutLog -RedirectStandardError $stderrLog -PassThru Write-Marker "launch pid=$($process.Id) commit=$commit session='$env:SESSIONNAME'" + $null = Wait-ForLogPattern $process $stdoutLog 'live: in world' 1 $LoginTimeoutSeconds + # Attach EventPipe observers only after normal CLR/client startup. Starting + # dotnet-counters in the process-creation race can suspend the runtime + # before the graphical host has created a window. The route's 15-second + # warm-up leaves ample time to attach before its first teleport. if (-not $SkipRuntimeCounters) { $counterArguments = @( 'collect', @@ -721,7 +726,6 @@ try { Write-Marker "contention-capture pid=$($traceProcess.Id)" } - $null = Wait-ForLogPattern $process $stdoutLog 'live: in world' 1 $LoginTimeoutSeconds # "live: first player position" is a recenter diagnostic, not a session # boundary: it is intentionally absent when the player's authoritative # first cell already matches the initial streaming center. The first