Repository navigation
Improve Azure hosting test logging and stability - #20249
James Newton-King (JamesNK) merged 3 commits into
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20249Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20249" |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The remote-process helper silently returns on timeout, allowing incomplete output checks and a second timeout wait during disposal.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Improves Azure hosting test diagnostics and stability by avoiding unnecessary emulator startup and consistently capturing builder and child-process logs.
Changes:
- Routes Azure test builder logs through
ITestOutputHelper. - Converts emulator configuration checks to configuration-only tests.
- Redirects and drains
RemoteExecutoroutput.
| File | Description |
|---|---|
tests/Aspire.Hosting.TestUtilities/Utils/TestDistributedApplicationBuilder.cs |
Adds output-aware builder overloads. |
tests/Aspire.Hosting.Azure.Tests/TokenCredentialProviderTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/RoleAssignmentTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/RemoteTestOutputHelper.cs |
Bridges child-process output to tests. |
tests/Aspire.Hosting.Azure.Tests/PublicApiTests/WebPubSubPublicApiTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/PublicApiTests/SqlPublicApiTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/PublicApiTests/SignalRPublicApiTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/PublicApiTests/ServiceBusPublicApiTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/PublicApiTests/SearchPublicApiTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/PublicApiTests/RedisPublicApiTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/PublicApiTests/PostgreSQLPublicApiTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/PublicApiTests/OperationalInsightsPublicApiTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/PublicApiTests/KeyVaultPublicApiTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/PublicApiTests/FunctionsPublicApiTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/PublicApiTests/EventHubsPublicApiTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/PublicApiTests/CosmosDBPublicApiTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/PublicApiTests/CognitiveServicesPublicApiTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/PublicApiTests/ApplicationInsightsPublicApiTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/PublicApiTests/AppContainersPublicApiTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/PublicApiTests/AppConfigurationPublicApiTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/FoundryDeploymentConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/FoundryConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/ExistingAzureResourceExtensionsTests.cs |
Propagates test output through factories. |
tests/Aspire.Hosting.Azure.Tests/DurableTaskResourceExtensionsTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/ContainerRegistryTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/BicepUtilitiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureWebPubSubExtensionsTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureWebPubSubConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureUserAssignedIdentityTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureTableStorageConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureStorageResourceUriExpressionTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureStoragePrivateEndpointLockdownTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureStorageEmulatorFunctionalTests.cs |
Uses centralized logging setup. |
tests/Aspire.Hosting.Azure.Tests/AzureStorageConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureSqlExtensionsTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureSqlDeploymentScriptTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureSqlDatabaseConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureSqlConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureSignalRExtensionsTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureSignalREmulatorFunctionalTest.cs |
Uses centralized logging setup. |
tests/Aspire.Hosting.Azure.Tests/AzureSignalRConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureServiceBusTopicConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureServiceBusSubscriptionConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureServiceBusQueueConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureServiceBusConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureSearchExtensionsTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureSearchConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureRunAsEmulatorModeTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureResourcePreparerTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureResourceOptionsTests.cs |
Passes output to publish builder. |
tests/Aspire.Hosting.Azure.Tests/AzureRedisExtensionsTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureQueueStorageQueueConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureQueueStorageConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureProvisioningResourceTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureProvisioningResourceExtensionsTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzurePrivateEndpointLockdownTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzurePrivateEndpointExtensionsTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzurePostgresFlexibleServerDatabaseConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzurePostgresFlexibleServerConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzurePostgresExtensionsTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureOpenAIExtensionsTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureOpenAIDeploymentConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureOpenAIConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureNetworkSecurityPerimeterExtensionsTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureNetworkSecurityGroupExtensionsTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureNatGatewayExtensionsTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureManagedRedisExtensionsTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureManagedRedisConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureLogAnalyticsWorkspaceExtensionsTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureKustoExtensionsTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureKeyVaultConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureInfrastructureExtensionsTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureFrontDoorTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureEventHubsConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureEventHubConsumerGroupConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureEventHubConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureEnvironmentResourceTests.cs |
Forwards and verifies remote logs. |
tests/Aspire.Hosting.Azure.Tests/AzureEnvironmentResourceExtensionsTests.cs |
Enables shared builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureDataLakeStorageResourceGetConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureDataLakeStorageFileSystemConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureCosmosDBDatabaseConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureCosmosDBContainerConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureCosmosDBConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureContainerRegistryTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureContainerAppExpressTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureContainerAppExpressEndpointTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureContainerAppEnvironmentExtensionsTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureBlobStorageContainerConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureBlobStorageConnectionPropertiesTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureBicepResourceTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureAppServiceEnvironmentExtensionsTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureApplicationInsightsExtensionsTests.cs |
Enables builder logging. |
tests/Aspire.Hosting.Azure.Tests/AzureAppConfigurationExtensionsTests.cs |
Enables builder logging. |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The configuration-only tests avoid unnecessary runtime startup, and the remote logging path includes focused timeout and output-drain coverage.
Review effort: Balanced
Findings: None
Resolved since last review (1)
Mitch Denny (mitchdenny)
left a comment
There was a problem hiding this comment.
Reviewed the logging, remote-process timeout cleanup, and configuration-only test changes. No blocking issues found.
a20c79b
into
microsoft:main

Description
A configuration-only Azure Service Bus emulator test intermittently failed in CI while stopping the distributed application after its assertions had already passed. These tests only inspect generated emulator configuration and do not need to start containers.
This change:
ITestOutputHelperto everyTestDistributedApplicationBuildercreated byAspire.Hosting.Azure.Tests, ensuring hosting and resource logs are available in test output.RemoteExecutorchild processes through redirected console output to the parent test output helper, and drains redirected output before completion.Validation:
dotnet build tests/Aspire.Hosting.Azure.Tests/Aspire.Hosting.Azure.Tests.csproj --no-restore /p:SkipNativeBuild=trueAzurePublishingContext_WithBicepTemplateFile_WorksWithRelativePathpasses and verifies that the final child-process log reaches the parent test output.Fixes #20224
Fixes #20227
Related to #7066
Checklist
<remarks />and<code />elements on your triple slash comments?