microsoft / microsoft/aspire

`AddStandardResilienceHandler` and healthchecks result in noisy logs with TestHost

Open
#6,788 6 comments 3 reactions 0 assignees View on GitHub
area-app-testing
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

The default integration test template calls `ConfigureHttpClientDefaults` with `AddStandardResilienceHandler`

https://github.com/dotnet/aspire/blob/b45b0461b789c64d1b1dfa421f63e2e7a09540af/src/Aspire.ProjectTemplates/templates/aspire-nunit/9.0/IntegrationTest1.cs#L19-L22

This however produces a lot of noise in 9.0 with the built in health checks this ends up producing a lot of number of distracting messages in the test host. e.g.

```
info: Polly[3]
Execution attempt. Source: '-standard//Standard-Retry', Operation Key: '', Result: '200', Handled: 'False', Attempt: '0', Execution Time: 1061.2159ms
```

Are these resiliency headers still a good recommendation for tests in 9.0? In 8.x before healthchecks & readiness, request resiliency was highly needed to make sure the apps had started up properly, but with 9.0's health check support is that still necessary? (Particularly if the sample tests replace `WaitForResourceAsync` with `WaitForResourceHealthyAsync`)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.