Skip to content

.NET: Increase credential timeout for Integration Tests#4472

Open
westey-m wants to merge 6 commits intomicrosoft:mainfrom
westey-m:credential-timeout-increase
Open

.NET: Increase credential timeout for Integration Tests#4472
westey-m wants to merge 6 commits intomicrosoft:mainfrom
westey-m:credential-timeout-increase

Conversation

@westey-m
Copy link
Contributor

@westey-m westey-m commented Mar 4, 2026

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.

Copilot AI review requested due to automatic review settings March 4, 2026 17:13
@markwallace-microsoft markwallace-microsoft added documentation Improvements or additions to documentation .NET labels Mar 4, 2026
@github-actions github-actions bot changed the title Increase credential timeout for Integration Tests .NET: Increase credential timeout for Integration Tests Mar 4, 2026
Copy link
Contributor

Copilot AI left a comment

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
File Description
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests.csproj Enables injection of the shared Azure credentials helper into this test project.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs Switches workflow test harness to use TestCredentials.CreateAzureCliCredential().
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/AzureAgentProviderTest.cs Uses shared credential helper for provider construction.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/VisionAgentProvider.cs Uses shared credential helper for AIProjectClient.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/TestAgentProvider.cs Uses shared credential helper for AIProjectClient.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/PoemAgentProvider.cs Uses shared credential helper for AIProjectClient.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/MathChatAgentProvider.cs Uses shared credential helper for AIProjectClient.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/MarketingAgentProvider.cs Uses shared credential helper for AIProjectClient.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/FunctionToolAgentProvider.cs Uses shared credential helper for AIProjectClient.
dotnet/tests/Microsoft.Agents.AI.FoundryMemory.IntegrationTests/Microsoft.Agents.AI.FoundryMemory.IntegrationTests.csproj Enables injection of the shared Azure credentials helper into this test project.
dotnet/tests/Microsoft.Agents.AI.FoundryMemory.IntegrationTests/FoundryMemoryProviderTests.cs Uses shared credential helper for AIProjectClient.
dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/TestHelper.cs Uses shared credential helper for AzureOpenAIClient when authenticating via Azure CLI.
dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/Microsoft.Agents.AI.DurableTask.IntegrationTests.csproj Enables injection of the shared Azure credentials helper into this test project.
dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistentFixture.cs Uses shared credential helper for PersistentAgentsClient.
dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistent.IntegrationTests.csproj Enables injection of the shared Azure credentials helper into this test project.
dotnet/tests/AzureAI.IntegrationTests/AzureAI.IntegrationTests.csproj Enables injection of the shared Azure credentials helper into this test project.
dotnet/tests/AzureAI.IntegrationTests/AIProjectClientFixture.cs Uses shared credential helper for AIProjectClient.
dotnet/src/Shared/IntegrationTestsAzureCredentials/TestCredentials.cs Introduces shared helper creating AzureCliCredential with longer process timeout.
dotnet/src/Shared/IntegrationTestsAzureCredentials/README.md Documents how to enable the shared credentials helper via MSBuild property.
dotnet/eng/MSBuild/Shared.props Adds a new conditional Compile include to inject the shared credentials helper.
dotnet/agent-framework-dotnet.slnx Adds solution items for the new shared credentials helper folder/files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation .NET

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants