Is your feature request related to a problem? Please describe the problem.
I've found that I'm using ResourceNotificationService a lot in tests using DistributedApplicationTestingBuilder, and wonder if it's something worth exposing directly, rather than being hidden behind a GetRequiredService call.
Or perhaps rather than exposing ResourceNotificationService, expose something that's little more suited for the automated tests. E.g. a version of WaitForResourceAsync that fails fast if a resource goes to a terminal state, as opposed to the version in ResourceNotificationService which continues to wait as it's possible as it's possible the service starts again at a later date.
Describe the solution you'd like
var appHost = await DistributedApplicationTestingBuilder.CreateAsync<Projects.AspireApp2_AppHost>();
await using var app = await appHost.BuildAsync();
await app.StartAsync();
await appHost.ResourceNotificationService.WaitForResourceAsync("whatever");
// Or possibly something more like:
await appHost.WaitFor*("whatever");
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
I've found that I'm using
ResourceNotificationService
a lot in tests usingDistributedApplicationTestingBuilder
, and wonder if it's something worth exposing directly, rather than being hidden behind aGetRequiredService
call.Or perhaps rather than exposing
ResourceNotificationService
, expose something that's little more suited for the automated tests. E.g. a version ofWaitForResourceAsync
that fails fast if a resource goes to a terminal state, as opposed to the version inResourceNotificationService
which continues to wait as it's possible as it's possible the service starts again at a later date.Describe the solution you'd like
Additional context
No response