Prove: due gare dei tempi emerse nella prima CI di #37
La prova «al volante» lasciava andare /api/ricerca prima che la pagina, dopo la sua attesa di 150 ms, mandasse il testo: la richiesta passava non trattenuta e non veniva contata. Ora aspetta che sia partita. AfterACrashChromiumRestartsAndSubscriptionsSurvive leggeva lo stato fra il conteggio del riavvio e «Running», perché Reconnected arriva mentre il nuovo processo si collega: ora aspetta entrambi. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9941a2fa1f
commit
a85d0e568e
3 files changed
+10
-3
No files matched your search
@@ -41,7 +41,9 @@ public sealed class BrowserLifecycleTests
|
||||
browser.Host.KillForRestart();
|
||||
await reconnected.Task.WaitAsync(TimeSpan.FromSeconds(30));
|
||||
var watch = Stopwatch.StartNew();
|
||||
while (browser.Host.Restarts == 0 && watch.Elapsed < TimeSpan.FromSeconds(10))
|
||||
// Reconnected is raised while the new process is being connected, before the supervisor counts the restart and
|
||||
// marks it Running: wait for both, not only for the count.
|
||||
while ((browser.Host.Restarts == 0 || browser.Host.State != SupervisedState.Running) && watch.Elapsed < TimeSpan.FromSeconds(10))
|
||||
{
|
||||
await Task.Delay(20);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user