Skip to content

Commit

Permalink
[browser][wbt] Extend delay when waiting for URLs (#99446)
Browse files Browse the repository at this point in the history
  • Loading branch information
maraf authored Mar 9, 2024
1 parent 51d0367 commit a8509d9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/mono/wasm/Wasm.Build.Tests/BrowserRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,17 @@ public async Task<string> StartServerAndGetUrlAsync(
cmd.WithErrorDataReceived(outputHandler).WithOutputDataReceived(outputHandler);
var runTask = cmd.ExecuteAsync(args);

await Task.WhenAny(runTask, urlAvailable.Task, Task.Delay(TimeSpan.FromSeconds(30)));
var delayTask = Task.Delay(TimeSpan.FromSeconds(30));

await Task.WhenAny(runTask, urlAvailable.Task, delayTask);
if (delayTask.IsCompleted)
{
_testOutput.WriteLine("First 30s delay reached, scheduling next one");

delayTask = Task.Delay(TimeSpan.FromSeconds(30));
await Task.WhenAny(runTask, urlAvailable.Task, delayTask);
}

if (runTask.IsCompleted)
{
var res = await runTask;
Expand Down

0 comments on commit a8509d9

Please sign in to comment.