Skip to content

Commit c756bd6

Browse files
committed
increaset timeout value for azure functions integration tests.
1 parent d8dadbe commit c756bd6

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

dotnet/tests/Microsoft.Agents.AI.Hosting.AzureFunctions.IntegrationTests/SamplesValidation.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ public sealed class SamplesValidation(ITestOutputHelper outputHelper) : IAsyncLi
3030

3131
private static bool s_infrastructureStarted;
3232
private static readonly TimeSpan s_orchestrationTimeout = TimeSpan.FromMinutes(1);
33+
34+
// In CI, `dotnet run` builds the Functions project from scratch before the host starts, so 60s is not enough.
35+
private static readonly TimeSpan s_functionsReadyTimeout = TimeSpan.FromSeconds(180);
36+
3337
private static readonly string s_samplesPath = Path.GetFullPath(
3438
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "..", "..", "..", "..", "..", "samples", "04-hosting", "DurableAgents", "AzureFunctions"));
3539

@@ -930,7 +934,7 @@ await this.WaitForConditionAsync(
930934
}
931935
},
932936
message: "Azure Functions Core Tools is ready",
933-
timeout: TimeSpan.FromSeconds(60));
937+
timeout: s_functionsReadyTimeout);
934938
}
935939

936940
private async Task WaitForOrchestrationCompletionAsync(Uri statusUri)

dotnet/tests/Microsoft.Agents.AI.Hosting.AzureFunctions.IntegrationTests/WorkflowSamplesValidation.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ public sealed class WorkflowSamplesValidation(ITestOutputHelper outputHelper) :
2929

3030
private static bool s_infrastructureStarted;
3131
private static readonly TimeSpan s_orchestrationTimeout = TimeSpan.FromMinutes(1);
32+
33+
// In CI, `dotnet run` builds the Functions project from scratch before the host starts, so 60s is not enough.
34+
private static readonly TimeSpan s_functionsReadyTimeout = TimeSpan.FromSeconds(180);
35+
3236
private static readonly string s_samplesPath = Path.GetFullPath(
3337
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "..", "..", "..", "..", "..", "samples", "04-hosting", "DurableWorkflows", "AzureFunctions"));
3438

@@ -514,7 +518,7 @@ await this.WaitForConditionAsync(
514518
}
515519
},
516520
message: "Azure Functions Core Tools is ready",
517-
timeout: TimeSpan.FromSeconds(60));
521+
timeout: s_functionsReadyTimeout);
518522
}
519523

520524
private async Task RunCommandAsync(string command, string[] args)

0 commit comments

Comments
 (0)