Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests] Add resource logging to Aspire.Hosting.* tests #5193

Merged
merged 10 commits into from
Aug 6, 2024

Conversation

radical
Copy link
Member

@radical radical commented Aug 6, 2024

Add overloads to TestDistributedApplicationBuilder.Create with ITestOutputHelper to add xunit, and resource logging. And a .WithTestAndResourceLogging() to help with other Create methods.

Rest of the changes per test project remove the helper methods, and update the calls to use the new changes from above.

This will help with debugging flaky test failures on CI.

Suggested by @Alirexaa in #5140 (comment) .

Microsoft Reviewers: Open in CodeFlow

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-integrations Issues pertaining to Aspire Integrations packages label Aug 6, 2024
Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this! I pushed some feedback to the PR, and it LGTM.

@eerhardt eerhardt enabled auto-merge (squash) August 6, 2024 16:25
@sebastienros
Copy link
Member

We won't need #4965 after that

@eerhardt eerhardt merged commit 5ee120f into dotnet:main Aug 6, 2024
11 checks passed
Comment on lines 4 to 6
#pragma warning disable IDE0005 // Using directive is unnecessary. This warning happens when building this file in Aspire.Hosting.Tests.csproj
using Aspire.Hosting.ApplicationModel;
#pragma warning restore IDE0005 // Using directive is unnecessary.
Copy link
Member Author

Choose a reason for hiding this comment

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

this is better, thanks!

@radical radical deleted the add-logging-to-tests branch August 6, 2024 23:33
@github-actions github-actions bot locked and limited conversation to collaborators Sep 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-integrations Issues pertaining to Aspire Integrations packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants