public void BenchmarkSetup() { TestClusterOptions.DefaultTraceToConsole = false; var options = new TestClusterOptions(1); options.ClusterConfiguration.ApplyToAllNodes(c => c.DefaultTraceLevel = Severity.Warning); _host = new TestCluster(options); _host.Deploy(); }
private void Initialize(TestClusterOptions options = null) { if (options == null) { options = new TestClusterOptions(1); } testCluster = new TestCluster(options); testCluster.Deploy(); }
private void SetupAndDeployCluster(string defaultPlacementStrategy, params Type[] blackListedTypes) { cluster?.StopAllSilos(); var typesName = blackListedTypes.Select(t => t.FullName).ToList(); var options = new TestClusterOptions(1); options.ClusterConfiguration.Globals.TypeMapRefreshInterval = refreshInterval; options.ClusterConfiguration.Globals.DefaultPlacementStrategy = defaultPlacementStrategy; options.ClusterConfiguration.Overrides[Silo.PrimarySiloName].ExcludedGrainTypes = typesName; cluster = new TestCluster(options); cluster.Deploy(); }
private void Initialize(TimeSpan collectionAgeLimit, TimeSpan quantum) { GlobalConfiguration.ENFORCE_MINIMUM_REQUIREMENT_FOR_AGE_LIMIT = false; var options = new TestClusterOptions(1); var config = options.ClusterConfiguration; config.Globals.CollectionQuantum = quantum; config.Globals.Application.SetDefaultCollectionAgeLimit(collectionAgeLimit); config.Globals.Application.SetCollectionAgeLimit(typeof(IdleActivationGcTestGrain2), TimeSpan.FromSeconds(10)); config.Globals.Application.SetCollectionAgeLimit(typeof(BusyActivationGcTestGrain2), TimeSpan.FromSeconds(10)); testCluster = new TestCluster(config); testCluster.Deploy(); }
public override TestCluster CreateTestCluster() { // Define a cluster of 4, but deploy ony 2 to start. var options = new TestClusterOptions(4); options.ClusterConfiguration.AddMemoryStorageProvider("PubSubStore"); var persistentStreamProviderConfig = new PersistentStreamProviderConfig { SiloMaturityPeriod = SILO_IMMATURE_PERIOD, BalancerType = StreamQueueBalancerType.DynamicClusterConfigDeploymentBalancer, }; options.ClusterConfiguration.AddAzureQueueStreamProvider(adapterName, persistentStreamProviderConfig: persistentStreamProviderConfig); options.ClientConfiguration.Gateways = options.ClientConfiguration.Gateways.Take(1).ToList(); var host = new TestCluster(options); host.Deploy(new[] { Silo.PrimarySiloName, "Secondary_1" }); return host; }