public void ConfigTest_LinearRetry() { TestHelper.UpdateIppConfig("retry", "mode", RetryMode.Linear.ToString()); IppConfigurationSection ippConfigurationSection = IppConfigurationSection.Instance; Assert.AreEqual(ippConfigurationSection.Retry.Mode, RetryMode.Linear); LocalConfigReader reader = new LocalConfigReader(); TestHelper.UpdateIppConfig("retry/linearRetry", "retryCount", "1"); TestHelper.UpdateIppConfig("retry/linearRetry", "retryInterval", new TimeSpan(20).ToString()); IppConfiguration ippConfig = reader.ReadConfiguration(); Assert.IsNotNull(ippConfig.RetryPolicy); }
public void ConfigTest_ExponentialRetry() { TestHelper.UpdateIppConfig("retry", "mode", RetryMode.Exponential.ToString()); IppConfigurationSection ippConfigurationSection = IppConfigurationSection.Instance; Assert.AreEqual(ippConfigurationSection.Retry.Mode, RetryMode.Exponential); LocalConfigReader reader = new LocalConfigReader(); TestHelper.UpdateIppConfig("retry/exponentialRetry", "retryCount", "2"); TestHelper.UpdateIppConfig("retry/exponentialRetry", "minBackoff", new TimeSpan(20).ToString()); TestHelper.UpdateIppConfig("retry/exponentialRetry", "maxBackoff", new TimeSpan(20).ToString()); TestHelper.UpdateIppConfig("retry/exponentialRetry", "deltaBackoff", new TimeSpan(20).ToString()); IppConfiguration ippConfig = reader.ReadConfiguration(); Assert.IsNotNull(ippConfig.RetryPolicy); }