Skip to content

.NET: Increase credential timeout for Integration Tests - #4472

Merged
westey (westey-m) merged 6 commits into
microsoft:mainfrom
westey-m:credential-timeout-increase
Mar 5, 2026
Merged

.NET: Increase credential timeout for Integration Tests#4472
westey (westey-m) merged 6 commits into
microsoft:mainfrom
westey-m:credential-timeout-increase

Conversation

@westey-m

Copy link
Copy Markdown
Contributor

Motivation and Context

Integration tests are often failing with a timeout on new AzureCliCredential().

Description

  • Increasing the timeout to 60s from 13s to avoid these.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

CopilotAI review requested due to automatic review settings March 4, 2026 17:13
@markwallace-microsoftMark Wallace (markwallace-microsoft) added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs .NET Usage: [Issues, PRs], Target: .Net labels Mar 4, 2026
@github-actionsgithub-actionsBot changed the title Increase credential timeout for Integration Tests.NET: Increase credential timeout for Integration TestsMar 4, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates .NET integration tests to use a shared Azure CLI credential helper with a longer process timeout, reducing CI flakiness from AzureCliCredential initialization.

Changes:

  • Add Shared.IntegrationTests.TestCredentials helper that creates an AzureCliCredential with a 60s ProcessTimeout.
  • Wire the helper into several integration test projects and update call sites to use it.
  • Extend MSBuild shared-code injection (Shared.props) and solution items to include the new shared helper.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 4 comments.

Show a summary per file
FileDescription
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests.csprojEnables injection of the shared Azure credentials helper into this test project.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.csSwitches workflow test harness to use TestCredentials.CreateAzureCliCredential().
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/AzureAgentProviderTest.csUses shared credential helper for provider construction.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/VisionAgentProvider.csUses shared credential helper for AIProjectClient.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/TestAgentProvider.csUses shared credential helper for AIProjectClient.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/PoemAgentProvider.csUses shared credential helper for AIProjectClient.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/MathChatAgentProvider.csUses shared credential helper for AIProjectClient.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/MarketingAgentProvider.csUses shared credential helper for AIProjectClient.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/FunctionToolAgentProvider.csUses shared credential helper for AIProjectClient.
dotnet/tests/Microsoft.Agents.AI.FoundryMemory.IntegrationTests/Microsoft.Agents.AI.FoundryMemory.IntegrationTests.csprojEnables injection of the shared Azure credentials helper into this test project.
dotnet/tests/Microsoft.Agents.AI.FoundryMemory.IntegrationTests/FoundryMemoryProviderTests.csUses shared credential helper for AIProjectClient.
dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/TestHelper.csUses shared credential helper for AzureOpenAIClient when authenticating via Azure CLI.
dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/Microsoft.Agents.AI.DurableTask.IntegrationTests.csprojEnables injection of the shared Azure credentials helper into this test project.
dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistentFixture.csUses shared credential helper for PersistentAgentsClient.
dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistent.IntegrationTests.csprojEnables injection of the shared Azure credentials helper into this test project.
dotnet/tests/AzureAI.IntegrationTests/AzureAI.IntegrationTests.csprojEnables injection of the shared Azure credentials helper into this test project.
dotnet/tests/AzureAI.IntegrationTests/AIProjectClientFixture.csUses shared credential helper for AIProjectClient.
dotnet/src/Shared/IntegrationTestsAzureCredentials/TestCredentials.csIntroduces shared helper creating AzureCliCredential with longer process timeout.
dotnet/src/Shared/IntegrationTestsAzureCredentials/README.mdDocuments how to enable the shared credentials helper via MSBuild property.
dotnet/eng/MSBuild/Shared.propsAdds a new conditional Compile include to inject the shared credentials helper.
dotnet/agent-framework-dotnet.slnxAdds solution items for the new shared credentials helper folder/files.

Comment threaddotnet/tests/AzureAI.IntegrationTests/AIProjectClientFixture.cs Outdated
@westey-m
westey (westey-m) added this pull request to the merge queueMar 5, 2026
Merged via the queue into microsoft:main with commit 6dc65dbMar 5, 2026
20 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationUsage: [Issues, PRs], Target: documentation in the code base and learn docs.NETUsage: [Issues, PRs], Target: .Net

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@westey-m@rogerbarreto@SergeyMenshykh@markwallace-microsoft