diff --git a/src/ReverseProxy/Health/ConsecutiveFailuresHealthPolicy.cs b/src/ReverseProxy/Health/ConsecutiveFailuresHealthPolicy.cs index 4a2854901..719c0023e 100644 --- a/src/ReverseProxy/Health/ConsecutiveFailuresHealthPolicy.cs +++ b/src/ReverseProxy/Health/ConsecutiveFailuresHealthPolicy.cs @@ -40,9 +40,10 @@ public void ProbingCompleted(ClusterState cluster, IReadOnlyList Assert.Equal(DestinationHealth.Healthy, d.Health.Active)); + Assert.Equal(DestinationHealth.Unknown, cluster0.Destinations.Values.First().Health.Active); + Assert.Equal(DestinationHealth.Healthy, cluster0.Destinations.Values.Skip(1).First().Health.Active); policy.ProbingCompleted(cluster1, probingResults1); - Assert.All(cluster1.Destinations.Values, d => Assert.Equal(DestinationHealth.Healthy, d.Health.Active)); + Assert.Equal(DestinationHealth.Healthy, cluster1.Destinations.Values.First().Health.Active); + Assert.Equal(DestinationHealth.Unknown, cluster1.Destinations.Values.Skip(1).First().Health.Active); // Second probing attempt policy.ProbingCompleted(cluster0, probingResults0); Assert.Equal(DestinationHealth.Unhealthy, cluster0.Destinations.Values.First().Health.Active); Assert.Equal(DestinationHealth.Healthy, cluster0.Destinations.Values.Skip(1).First().Health.Active); policy.ProbingCompleted(cluster1, probingResults1); - Assert.All(cluster1.Destinations.Values, d => Assert.Equal(DestinationHealth.Healthy, d.Health.Active)); + Assert.Equal(DestinationHealth.Healthy, cluster1.Destinations.Values.First().Health.Active); + Assert.Equal(DestinationHealth.Unknown, cluster1.Destinations.Values.Skip(1).First().Health.Active); // Third probing attempt policy.ProbingCompleted(cluster0, probingResults0);