public void Initialize(OrchestratorConfiguration configuration) { if (configuration.Databases?.Length == 0) { throw new InvalidOperationException("Must be at least one database configured!"); } if (configuration.Clusters?.Length == 0) { throw new InvalidOperationException("Must be at least one cluster configured!"); } _nextConfigLazy = new Lazy <TestConfig>(() => new TestConfig { Database = configuration.Databases[0], Urls = configuration.Clusters[0].Urls, StrategyName = Name }); }
public void Initialize(OrchestratorConfiguration configuration) { if (configuration.Databases?.Length == 0) { throw new InvalidOperationException("Must be at least one database configured!"); } if (configuration.Clusters?.Length == 0) { throw new InvalidOperationException("Must be at least one cluster configured!"); } var rnd = random.Next(1, configuration.Databases.Length - 1); _nextConfigLazy = new Lazy <TestConfig>(() => new TestConfig { Database = configuration.Databases[rnd], Urls = configuration.Clusters[0].Urls, StrategyName = Name, PfxFilePath = configuration.Clusters[0].PfxFilePath }); }