private void AssertCacheMonitorCallCounters(CacheMonitorCounters totalCacheMonitorCallCounters)
 {
     Assert.True(totalCacheMonitorCallCounters.TrackCachePressureMonitorStatusChangeCallCounter > 0);
     Assert.True(totalCacheMonitorCallCounters.TrackMemoryAllocatedCallCounter > 0);
     Assert.Equal(0, totalCacheMonitorCallCounters.TrackMemoryReleasedCallCounter);
     Assert.True(totalCacheMonitorCallCounters.TrackMessageAddedCounter > 0);
     Assert.Equal(0, totalCacheMonitorCallCounters.TrackMessagePurgedCounter);
 }
示例#2
0
        private void AssertCacheMonitorCallCounters(CacheMonitorCounters totalCacheMonitorCallCounters)
        {
            var c = totalCacheMonitorCallCounters;

            Assert.True(c.TrackCachePressureMonitorStatusChangeCallCounter > 0,
                        $"Expected {nameof(c.TrackCachePressureMonitorStatusChangeCallCounter)} > 0, got {c.TrackCachePressureMonitorStatusChangeCallCounter}");
            Assert.True(c.TrackMemoryAllocatedCallCounter > 0, $"Expected {nameof(c.TrackMemoryAllocatedCallCounter)} > 0, got {c.TrackMemoryAllocatedCallCounter}");
            Assert.True(0 == c.TrackMemoryReleasedCallCounter, $"Expected {nameof(c.TrackMemoryReleasedCallCounter)} == 0, got {c.TrackMemoryReleasedCallCounter}");
            Assert.True(c.TrackMessageAddedCounter > 0, $"Expected {nameof(c.TrackMessageAddedCounter)} > 0, got {c.TrackMessageAddedCounter}");
            Assert.True(0 == c.TrackMessagePurgedCounter, $"Expected {nameof(c.TrackMessagePurgedCounter)} == 0, got {c.TrackMessagePurgedCounter}");
        }
 private CacheMonitorForTesting(EventHubCacheMonitorDimensions dimensions, Logger logger)
 {
     this.CallCounters = new CacheMonitorCounters();
     this.logger       = logger;
 }
示例#4
0
 private CacheMonitorForTesting()
 {
     this.CallCounters = new CacheMonitorCounters();
 }