Пример #1
0
        public async Task Disposed_StopMonitoring()
        {
            AddServiceNode();
            await Init();

            await WaitForUpdates();

            var healthRequestsCounterBeforeDisposed = _consulSimulator.HealthRequestsCounter;

            _nodeSource.Dispose();

            _consulSimulator.HealthRequestsCounter.ShouldBe(healthRequestsCounterBeforeDisposed, "service monitoring should have been stopped when the service became undeployed");
            GetHealthStatus().IsHealthy.ShouldBeTrue();
        }
Пример #2
0
 public async Task Teardown()
 {
     _nodeSource?.Dispose();
     _testingKernel?.Dispose();
     _consulNodeSourceFactory?.Dispose();
 }