Conversation
There was a problem hiding this comment.
Suggest putting this in dotnet/eng/scripts
Create-Filtered-Solution.ps1
There was a problem hiding this comment.
The only other ps build script we have (dotnet-check-coverage.ps1) is in .github/workflows.
There was a problem hiding this comment.
Would suggest moving both then.
Normally the pattern I see in MEAI and OpenAI is having a scripts folder, not necessarily within the eng.
There was a problem hiding this comment.
Pull request overview
Updates the .NET test stack and CI pipeline to reduce end-to-end build time by moving to xUnit v3 on Microsoft Testing Platform and running build/test work in parallel with solution filtering.
Changes:
- Migrate .NET tests to xUnit v3 + Microsoft Testing Platform (MTP), including updated async lifetime signatures and skip patterns.
- Split CI into parallel build-only and test jobs; generate filtered solutions to avoid building samples for test runs.
- Switch coverage collection to
Microsoft.Testing.Extensions.CodeCoveragewith a shared.runsettingsfile and updated report globbing.
Reviewed changes
Copilot reviewed 115 out of 115 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/tests/coverage.runsettings | Adds MTP code coverage settings (attribute exclusions). |
| dotnet/tests/OpenAIResponse.IntegrationTests/OpenAIResponseRunTests.cs | Replace attribute-based skipping with runtime skip calls for overridden conformance tests. |
| dotnet/tests/OpenAIResponse.IntegrationTests/OpenAIResponseRunStreamingTests.cs | Same skip pattern change for streaming conformance tests. |
| dotnet/tests/OpenAIResponse.IntegrationTests/OpenAIResponseFixture.cs | Update fixture async lifetime to ValueTask and add disposal pattern. |
| dotnet/tests/OpenAIResponse.IntegrationTests/OpenAIResponseChatClientAgentRunTests.cs | Replace [Fact(Skip=...)] overrides with runtime skip calls. |
| dotnet/tests/OpenAIResponse.IntegrationTests/OpenAIResponseChatClientAgentRunStreamingTests.cs | Same as above for streaming. |
| dotnet/tests/OpenAIChatCompletion.IntegrationTests/OpenAIChatCompletionFixture.cs | Update fixture async lifetime to ValueTask + suppress finalization. |
| dotnet/tests/OpenAIAssistant.IntegrationTests/OpenAIAssistantFixture.cs | Update fixture async lifetime to ValueTask; wrap delete task in ValueTask. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/WorkflowTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/TestOutputAdapter.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/PowerFx/WorkflowExpressionEngineTests.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/PowerFx/TemplateExtensionsTests.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/PowerFx/RecalcEngineTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/PowerFx/RecalcEngineFactoryTests.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/WorkflowActionExecutorTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/SetVariableExecutorTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/SetTextVariableExecutorTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/SetMultipleVariablesExecutorTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/SendActivityExecutorTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/RetrieveConversationMessagesExecutorTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/RetrieveConversationMessageExecutorTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/ResetVariableExecutorTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/RequestExternalInputExecutorTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/QuestionExecutorTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/ParseValueExecutorTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/InvokeFunctionToolExecutorTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/ForeachExecutorTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/EditTableV2ExecutorTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/EditTableExecutorTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/DefaultActionExecutorTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/CreateConversationExecutorTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/CopyConversationMessagesExecutorTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/ConditionGroupExecutorTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/ClearAllVariablesExecutorTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/AddConversationMessageExecutorTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/Interpreter/WorkflowModelTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/Events/ExternalInputResponseTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/Events/ExternalInputRequestTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/Events/EventTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/Entities/EntityExtractorTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/Entities/EntityExtractionResultTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/DeclarativeWorkflowTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/DeclarativeWorkflowExceptionTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/WorkflowActionTemplateTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/SetVariableTemplateTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/SetTextVariableTemplateTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/SetMultipleVariablesTemplateTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/RetrieveConversationMessagesTemplateTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/RetrieveConversationMessageTemplateTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/ResetVariableTemplateTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/ProviderTemplateTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/InvokeAzureAgentTemplateTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/GotoTemplateTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/ForeachTemplateTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/EndDialogTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/EndConversationTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/EdgeTemplateTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/DeclarativeEjectionTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/CreateConversationTemplateTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/CopyConversationMessagesTemplateTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/ContinueLoopTemplateTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/ConditionGroupTemplateTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/ClearAllVariablesTemplateTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/BreakLoopTemplateTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/AddConversationMessageTemplateTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/MediaInputTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/InvokeFunctionToolWorkflowTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/FunctionCallingWorkflowTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/WorkflowTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/TestOutputAdapter.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeCodeGenTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/AzureAgentProviderTest.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.Hosting.AzureFunctions.IntegrationTests/SamplesValidation.cs | Convert async lifetime + add sample build step and --no-build runs. |
| dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests/ToolCallingTests.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/TimeToLiveTests.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/TestHelper.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/OrchestrationTests.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/Logging/TestLoggerProvider.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/Logging/TestLogger.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/ExternalClientTests.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/ConsoleAppSamplesValidation.cs | Convert async lifetime + add sample build step and --no-build runs. |
| dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/AgentEntityTests.cs | Remove xUnit abstractions import (xUnit v3 migration cleanup). |
| dotnet/tests/Microsoft.Agents.AI.CosmosNoSql.UnitTests/Microsoft.Agents.AI.CosmosNoSql.UnitTests.csproj | Remove Xunit.SkippableFact package reference. |
| dotnet/tests/Microsoft.Agents.AI.CosmosNoSql.UnitTests/CosmosCheckpointStoreTests.cs | Migrate to ValueTask lifetime + replace skippable facts with runtime skip. |
| dotnet/tests/Microsoft.Agents.AI.CosmosNoSql.UnitTests/CosmosChatHistoryProviderTests.cs | Migrate to ValueTask lifetime + replace skippable facts with runtime skip. |
| dotnet/tests/Directory.Build.props | Switch test infra packages to xUnit v3 MTP + MTP coverage extension. |
| dotnet/tests/CopilotStudio.IntegrationTests/CopilotStudioRunTests.cs | Change skip behavior to runtime skipping and conditional manual verification. |
| dotnet/tests/CopilotStudio.IntegrationTests/CopilotStudioRunStreamingTests.cs | Same as above for streaming. |
| dotnet/tests/CopilotStudio.IntegrationTests/CopilotStudioFixture.cs | Make fixture skip when config missing; migrate to ValueTask lifetime. |
| dotnet/tests/CopilotStudio.IntegrationTests/CopilotStudio.IntegrationTests.csproj | Add warning suppression for updated test runner/tooling. |
| dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistentStructuredOutputRunTests.cs | Convert skip pattern to runtime skipping for flaky tests. |
| dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistentFixture.cs | Migrate to ValueTask async lifetime + cleanup. |
| dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistent.IntegrationTests.csproj | Add warning suppression for updated test runner/tooling. |
| dotnet/tests/AzureAI.IntegrationTests/AzureAI.IntegrationTests.csproj | Add warning suppression for updated test runner/tooling. |
| dotnet/tests/AzureAI.IntegrationTests/AIProjectClientFixture.cs | Migrate fixture async lifetime to ValueTask and wrap delete task. |
| dotnet/tests/AzureAI.IntegrationTests/AIProjectClientChatClientAgentRunTests.cs | Convert “skip” to runtime skip call. |
| dotnet/tests/AzureAI.IntegrationTests/AIProjectClientChatClientAgentRunStreamingTests.cs | Convert “skip” to runtime skip call. |
| dotnet/tests/AzureAI.IntegrationTests/AIProjectClientAgentStructuredOutputRunTests.cs | Convert “skip” to runtime skip call + update structured-output fixture init to ValueTask. |
| dotnet/tests/AzureAI.IntegrationTests/AIProjectClientAgentRunTests.cs | Convert “skip” to runtime skip call(s). |
| dotnet/tests/AzureAI.IntegrationTests/AIProjectClientAgentRunStreamingTests.cs | Convert “skip” to runtime skip call(s). |
| dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicSkillsIntegrationTests.cs | Move config load inside tests and runtime-skip local-only tests. |
| dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionRunTests.cs | Remove “skip-all” wrapper base and rely on fixture/test runtime skipping. |
| dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionRunStreamingTests.cs | Same as above for streaming. |
| dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionFixture.cs | Runtime-skip local-only tests; migrate async lifetime to ValueTask. |
| dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionChatClientAgentRunTests.cs | Remove “skip-all” wrapper base and rely on runtime skipping. |
| dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionChatClientAgentRunStreamingTests.cs | Same as above for streaming. |
| dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletion.IntegrationTests.csproj | Add warning suppression for updated test runner/tooling. |
| dotnet/tests/AgentConformance.IntegrationTests/AgentTests.cs | Update base test fixture lifecycle to xUnit v3 ValueTask pattern. |
| dotnet/global.json | Configure Microsoft Testing Platform runner for dotnet test. |
| dotnet/Directory.Packages.props | Update/replace test-related package versions for xUnit v3 + MTP + coverage extension. |
| dotnet/.github/skills/build-and-test/SKILL.md | Update local dev instructions for MTP CLI syntax and coverage usage. |
| .github/workflows/dotnet-build-and-test.yml | Split build/test into parallel jobs; add filtered-solution generation and MTP coverage/test args. |
| .github/workflows/New-FilteredSolution.ps1 | New script to generate framework/test-type filtered .slnx solutions for CI. |
Comments suppressed due to low confidence (4)
dotnet/tests/Microsoft.Agents.AI.Hosting.AzureFunctions.IntegrationTests/SamplesValidation.cs:51
SamplesValidationimplementsIAsyncLifetime, but the dispose method is implemented asIAsyncDisposable.DisposeAsync(). IfIAsyncLifetimeexpectsDisposeAsync()(as other tests in this PR do), this won’t satisfy the interface and the cleanup hook won’t run. ImplementValueTask IAsyncLifetime.DisposeAsync()(or a publicValueTask DisposeAsync()), and remove theIAsyncDisposableexplicit implementation unless the type explicitly implementsIAsyncDisposabletoo.
dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/ConsoleAppSamplesValidation.cs:45ConsoleAppSamplesValidationimplementsIAsyncLifetime, but the dispose method is implemented asIAsyncDisposable.DisposeAsync(). This likely doesn’t fulfillIAsyncLifetime.DisposeAsync()and can prevent xUnit from calling the fixture teardown. ImplementValueTask IAsyncLifetime.DisposeAsync()(or a publicValueTask DisposeAsync()), consistent with other updated fixtures in this PR.
dotnet/tests/Microsoft.Agents.AI.CosmosNoSql.UnitTests/CosmosCheckpointStoreTests.cs:66InitializeAsynccallsSkipIfEmulatorNotAvailable()before attempting the connection check that sets_emulatorAvailable. As written, local runs will always skip unlessCOSMOS_EMULATOR_AVAILABLE=trueis set, regardless of whether the emulator is actually reachable. Consider moving the skip decision after the connection attempt (or makeSkipIfEmulatorNotAvailableonly consult the env var during CI).
public async ValueTask InitializeAsync()
{
// Fail fast if emulator is not available
this.SkipIfEmulatorNotAvailable();
// Check environment variable to determine if we should preserve containers
// Set COSMOS_PRESERVE_CONTAINERS=true to keep containers and data for inspection
this._preserveContainer = string.Equals(Environment.GetEnvironmentVariable("COSMOS_PRESERVE_CONTAINERS"), "true", StringComparison.OrdinalIgnoreCase);
dotnet/tests/Microsoft.Agents.AI.CosmosNoSql.UnitTests/CosmosChatHistoryProviderTests.cs:71
InitializeAsynccallsSkipIfEmulatorNotAvailable()before the connection attempt that sets_emulatorAvailable, so the “Locally: skip if connection check failed” path can’t work. This causes local runs to always skip unlessCOSMOS_EMULATOR_AVAILABLE=trueis set. Move the skip check after the connection attempt, or adjust the skip logic so local availability is determined by the try/catch connection test.
public async ValueTask InitializeAsync()
{
// Fail fast if emulator is not available
this.SkipIfEmulatorNotAvailable();
// Check environment variable to determine if we should preserve containers
// Set COSMOS_PRESERVE_CONTAINERS=true to keep containers and data for inspection
this._preserveContainer = string.Equals(Environment.GetEnvironmentVariable("COSMOS_PRESERVE_CONTAINERS"), "true", StringComparison.OrdinalIgnoreCase);
this._connectionString = $"AccountEndpoint={s_emulatorEndpoint};AccountKey={s_emulatorKey}";
dotnet/tests/Microsoft.Agents.AI.Hosting.AzureFunctions.IntegrationTests/SamplesValidation.cs
Show resolved
Hide resolved
dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/ConsoleAppSamplesValidation.cs
Show resolved
Hide resolved
|
CAn we generate the build/solution artifact and use that in the |
This would require having tests depend on building everything, which is what we were doing before. Building everything takes up to 9 mins, while building just src and tests take around 2 mins. Its therefore faster to just build src/tests (2mins) and then run the tests (6/7mins), rather than building everything (9mins) and then running the tests (6/7mins). The build now builds everything in parallel to building and running just tests. |
This is unrelated existing behavior and is because this is a feature branch. See here |

Motivation and Context
Our builds are slow and needs improvement.
Description
Contribution Checklist