12 writes to Health
aspire (1)
Backchannel\TrayWatchStream.cs (1)
289
AppHosts = hosts.Select((host, index) => host with {
Health
= healthSubscriptions[candidates[index].Connection].Health })
Aspire.Cli.Tests (11)
Backchannel\TrayWatchStreamTests.cs (11)
701
Assert.Equal(initial with {
Health
= "healthy" }, await ReadHostAsync());
704
Assert.Equal(initial with {
Health
= "warning" }, await ReadHostAsync());
707
Assert.Equal(initial with {
Health
= "unhealthy" }, await ReadHostAsync());
710
Assert.Equal(initial with {
Health
= "healthy" }, await ReadHostAsync());
714
Assert.Equal(initial with {
Health
= "unhealthy" }, await ReadHostAsync());
717
Assert.Equal(initial with {
Health
= "healthy" }, await ReadHostAsync());
720
Assert.Equal(initial with {
Health
= null }, await ReadHostAsync());
834
Assert.Equal(first with {
Health
= "warning", ProcessStartTimeUnixMilliseconds = 2000 }, second);
989
JsonSerializer.Serialize(snapshot with { AppHosts = [host with {
Health
= "healthy" }] }, TrayCliJsonContext.Default.TrayWatchMessage),
990
JsonSerializer.Serialize(snapshot with { AppHosts = [host with {
Health
= "warning" }] }, TrayCliJsonContext.Default.TrayWatchMessage),
991
JsonSerializer.Serialize(snapshot with { AppHosts = [host with {
Health
= "unhealthy" }] }, TrayCliJsonContext.Default.TrayWatchMessage),
6 references to Health
Aspire.Cli.Tests (6)
Backchannel\TrayWatchStreamTests.cs (6)
697
Assert.Equal("warning", initial.
Health
);
780
Assert.Equal("healthy", Assert.Single((await messages.Reader.ReadAsync().AsTask().DefaultTimeout()).AppHosts!).
Health
);
785
Assert.Null(Assert.Single(message.AppHosts!).
Health
);
824
Assert.Equal("healthy", first.
Health
);
899
Assert.Equal("healthy", Assert.Single((await messages.Reader.ReadAsync().DefaultTimeout()).AppHosts!).
Health
);
908
Assert.Equal("warning", host.
Health
);