public void OperationCanceledException_DoesNotCauseAutomaticRetry()
        {
            var component = new WaitingComponent();
            var supervisor = new ServerSupervisor(component, _options);
            supervisor.Start();

            Thread.Sleep(500);
            supervisor.Dispose();

            Assert.Equal(1, component.CalledTimes);
        }
        public void Dispose_ShouldDisposeDisposableComponent()
        {
            // Arrange
            _options.MaxRetryAttempts = 0;

            var component = new DisposableComponent();
            var supervisor = new ServerSupervisor(component, _options);

            supervisor.Start();
            Thread.Sleep(100);

            // Act
            supervisor.Dispose();
            Thread.Sleep(500);

            // Assert
            Assert.True(component.Disposed);
        }