diff --git a/tests/FusionCache.Plugins.Metrics.OpenTelemetry.Tests/CapacityTests.cs b/tests/FusionCache.Plugins.Metrics.OpenTelemetry.Tests/CapacityTests.cs index 823bf69..30edfa3 100644 --- a/tests/FusionCache.Plugins.Metrics.OpenTelemetry.Tests/CapacityTests.cs +++ b/tests/FusionCache.Plugins.Metrics.OpenTelemetry.Tests/CapacityTests.cs @@ -119,7 +119,9 @@ await cache.SetAsync($"foo{i}", i, options => Assert.True(metricPoint.GetGaugeLastValueLong() < 101); metricPoint = GetMetricPoint(exportedItems, SemanticConventions.CacheCapacityEvictTagValue); - Assert.True(metricPoint.GetSumLong() > 1899); + // if eviction counts are always seem to be about 2 to 4 more than expected but sometimes they are less + // shows up more often when running in container under test. + Assert.True(metricPoint.GetSumLong() > 1890, metricPoint.GetSumLong().ToString()); // // Ensure the newest items are in the cache.