12 writes to Health
aspire (1)
Backchannel\TrayWatchStream.cs (1)
291
AppHosts = hosts.Select((host, index) => host with {
Health
= healthSubscriptions[candidates[index].Connection].Health })
Aspire.Cli.Tests (11)
Backchannel\TrayWatchStreamTests.cs (11)
759
Assert.Equal(initial with {
Health
= "healthy" }, await ReadHostAsync());
762
Assert.Equal(initial with {
Health
= "warning" }, await ReadHostAsync());
765
Assert.Equal(initial with {
Health
= "unhealthy" }, await ReadHostAsync());
768
Assert.Equal(initial with {
Health
= "healthy" }, await ReadHostAsync());
772
Assert.Equal(initial with {
Health
= "unhealthy" }, await ReadHostAsync());
775
Assert.Equal(initial with {
Health
= "healthy" }, await ReadHostAsync());
778
Assert.Equal(initial with {
Health
= null }, await ReadHostAsync());
892
Assert.Equal(first with {
Health
= "warning", ProcessStartTimeUnixMilliseconds = 2000 }, second);
1047
JsonSerializer.Serialize(snapshot with { AppHosts = [host with {
Health
= "healthy" }] }, TrayCliJsonContext.Default.TrayWatchMessage),
1048
JsonSerializer.Serialize(snapshot with { AppHosts = [host with {
Health
= "warning" }] }, TrayCliJsonContext.Default.TrayWatchMessage),
1049
JsonSerializer.Serialize(snapshot with { AppHosts = [host with {
Health
= "unhealthy" }] }, TrayCliJsonContext.Default.TrayWatchMessage),
6 references to Health
Aspire.Cli.Tests (6)
Backchannel\TrayWatchStreamTests.cs (6)
755
Assert.Equal("warning", initial.
Health
);
838
Assert.Equal("healthy", Assert.Single((await messages.Reader.ReadAsync().AsTask().DefaultTimeout()).AppHosts!).
Health
);
843
Assert.Null(Assert.Single(message.AppHosts!).
Health
);
882
Assert.Equal("healthy", first.
Health
);
957
Assert.Equal("healthy", Assert.Single((await messages.Reader.ReadAsync().DefaultTimeout()).AppHosts!).
Health
);
966
Assert.Equal("warning", host.
Health
);