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(); }
public async Task Teardown() { _nodeSource?.Dispose(); _testingKernel?.Dispose(); _consulNodeSourceFactory?.Dispose(); }