public void ConfigCommand_Key_Group_Domain_MaxConcurrentCount() { HystrixCommandBase.ConfigCommand <string>(TestCommandKey, TestGroupKey, TestDomain, CustomConfigSet.CommandMaxConcurrentCount); Assert.AreEqual(TestGroupKey, CommandComponents.CommandInfo.GroupKey, true); Assert.AreEqual(TestDomain, CommandComponents.CommandInfo.Domain, true); Assert.AreEqual(CustomConfigSet.CommandMaxConcurrentCount, CommandComponents.ConfigSet.CommandMaxConcurrentCount); }
public void ConfigAllCommandSettings() { Assert.IsFalse(ScenarioTestHelper.AreEqual(DefaultConfigSet, CustomConfigSet)); HystrixCommandBase.ConfigCommand <string>(TestCommandKey, configSet => ScenarioTestHelper.SetCommandConfigFrom(configSet, CustomConfigSet)); Assert.IsTrue(ScenarioTestHelper.AreEqual(CustomConfigSet, CommandComponents.ConfigSet)); }
public void ConfigCommand_Key_Domain_Config() { HystrixCommandBase.ConfigCommand <string>(TestCommandKey, TestDomain, config => ScenarioTestHelper.SetCommandConfigFrom(config, CustomConfigSet)); Assert.AreEqual(TestDomain, CommandComponents.CommandInfo.Domain, true); Assert.IsTrue(ScenarioTestHelper.AreEqual(CustomConfigSet, CommandComponents.ConfigSet)); }
public void ConfigCommandWithDefaultConfig() { HystrixCommandBase.ConfigCommand <string>(TestCommandKey, config => {}); Assert.AreEqual(TestCommandKey, CommandComponents.CommandInfo.Key, true); Assert.AreEqual(HystrixCommandBase.DefaultGroupKey, CommandComponents.CommandInfo.GroupKey, true); Assert.AreEqual(CommandDomains.Default, CommandComponents.CommandInfo.Domain, true); Assert.IsTrue(ScenarioTestHelper.AreEqual(DefaultConfigSet, CommandComponents.ConfigSet)); }
public void ConfigCommand_Key_Group_Domain_MaxConcurrentCount_Timeout_RequestCountThreshold_ErrorThresholdPercentage_FallbackMaxConcurrentCount() { HystrixCommandBase.ConfigCommand <string>(TestCommandKey, TestGroupKey, TestDomain, CustomConfigSet.CommandMaxConcurrentCount, CustomConfigSet.CommandTimeoutInMilliseconds, CustomConfigSet.CircuitBreakerRequestCountThreshold, CustomConfigSet.CircuitBreakerErrorThresholdPercentage, CustomConfigSet.FallbackMaxConcurrentCount); Assert.AreEqual(TestGroupKey, CommandComponents.CommandInfo.GroupKey, true); Assert.AreEqual(TestDomain, CommandComponents.CommandInfo.Domain, true); Assert.IsFalse(ScenarioTestHelper.AreEqual(CustomConfigSet, CommandComponents.ConfigSet)); Assert.AreEqual(CustomConfigSet.CommandMaxConcurrentCount, CommandComponents.ConfigSet.CommandMaxConcurrentCount); Assert.AreEqual(CustomConfigSet.CommandTimeoutInMilliseconds, CommandComponents.ConfigSet.CommandTimeoutInMilliseconds); Assert.AreEqual(CustomConfigSet.CircuitBreakerRequestCountThreshold, CommandComponents.ConfigSet.CircuitBreakerRequestCountThreshold); Assert.AreEqual(CustomConfigSet.CircuitBreakerErrorThresholdPercentage, CommandComponents.ConfigSet.CircuitBreakerErrorThresholdPercentage); Assert.AreEqual(CustomConfigSet.FallbackMaxConcurrentCount, CommandComponents.ConfigSet.FallbackMaxConcurrentCount); }
protected override void CustomTestInit() { HystrixCommandBase.ConfigCommand <string>(TestCommandKey, config => { }); CommandComponents.ConfigSet.InitTestHealthSnapshotInterval(); CommandComponents.ConfigSet.CommandTimeoutInMilliseconds = TimeoutInMilliseconds; }
public void ConfigCommand_Key_Group_Domain() { HystrixCommandBase.ConfigCommand <string>(TestCommandKey, TestGroupKey, TestDomain); Assert.AreEqual(TestGroupKey, CommandComponents.CommandInfo.GroupKey, true); Assert.AreEqual(TestDomain, CommandComponents.CommandInfo.Domain, true); }