Description of TimeoutManager.
 public void Timeout_100()
 {
     // Arrange
     var timeoutManager = new TimeoutManager(100);
     
     // Act
     var result = timeoutManager.CalculateAdaptiveDelay();
     
     // Assert
     MbUnit.Framework.Assert.AreEqual(Preferences.OnSleepDelay, result);
     Xunit.Assert.Equal(Preferences.OnSleepDelay, result);
 }
 public void Timeout_20000()
 {
     // Arrange
     var timeoutManager = new TimeoutManager(20000);
     
     // Act
     var result = timeoutManager.CalculateAdaptiveDelay();
     
     // Assert
     MbUnit.Framework.Assert.AreEqual(500, result);
     Xunit.Assert.Equal(500, result);
 }
Beispiel #3
0
 public virtual void OnSleepHook()
 {
     var timeoutManager = new TimeoutManager(Timeout);
     System.Threading.Thread.Sleep(timeoutManager.CalculateAdaptiveDelay());
 }
Beispiel #4
0
        public virtual void OnSleepHook()
        {
            var timeoutManager = new TimeoutManager(Timeout);

            System.Threading.Thread.Sleep(timeoutManager.CalculateAdaptiveDelay());
        }