Beispiel #1
0
        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 SetupAndDeployCluster(Type defaultPlacementStrategy, params Type[] blackListedTypes)
        {
            cluster?.StopAllSilos();
            var builder = new TestClusterBuilder(1)
            {
                CreateSiloAsync = AppDomainSiloHandle.Create
            };

            builder.Properties["DefaultPlacementStrategy"] = RuntimeTypeNameFormatter.Format(defaultPlacementStrategy);
            builder.Properties["BlacklistedGrainTypes"]    = string.Join("|", blackListedTypes.Select(t => t.FullName));
            builder.AddSiloBuilderConfigurator <SiloConfigurator>();
            builder.AddClientBuilderConfigurator <ClientConfigurator>();
            cluster = builder.Build();
            cluster.Deploy();
        }
        private void SetupAndDeployCluster(string defaultPlacementStrategy, params Type[] blackListedTypes)
        {
            cluster?.StopAllSilos();
            var typesName = blackListedTypes.Select(t => t.FullName).ToList();
            var builder   = new TestClusterBuilder(1);

            builder.ConfigureLegacyConfiguration(legacy =>
            {
                legacy.ClusterConfiguration.Globals.AssumeHomogenousSilosForTesting = false;
                legacy.ClusterConfiguration.Globals.TypeMapRefreshInterval          = refreshInterval;
                legacy.ClusterConfiguration.Globals.DefaultPlacementStrategy        = defaultPlacementStrategy;
                legacy.ClusterConfiguration.GetOrCreateNodeConfigurationForSilo(Silo.PrimarySiloName).ExcludedGrainTypes = typesName;
            });
            cluster = builder.Build();
            cluster.Deploy();
        }
 public void Dispose()
 {
     try
     {
         hostedCluster?.StopAllSilos();
     }
     finally
     {
         hostedCluster?.Dispose();
         hostedCluster = null;
     }
 }
 public void Dispose()
 {
     try
     {
         testCluster?.StopAllSilos();
     }
     finally
     {
         testCluster?.Dispose();
         testCluster = null;
     }
 }
Beispiel #6
0
 public void Dispose()
 {
     GlobalConfiguration.ENFORCE_MINIMUM_REQUIREMENT_FOR_AGE_LIMIT = true;
     testCluster?.StopAllSilos();
     testCluster = null;
 }
 public void Dispose()
 {
     testCluster?.StopAllSilos();
     testCluster = null;
 }
 public void Dispose()
 {
     Client?.Dispose();
     _cluster?.StopAllSilos();
 }
Beispiel #9
0
 public void Teardown()
 {
     _host.StopAllSilos();
 }
 public void Dispose()
 {
     _cluster.StopAllSilos();
 }
 public void Dispose()
 {
     Database.ExecuteAsync("FLUSHALL").Wait();
     Client.Dispose();
     Cluster.StopAllSilos();
 }
Beispiel #12
0
 public void TearDown()
 {
     _testCluster.StopAllSilos();
 }
Beispiel #13
0
 public void Dispose()
 {
     hostedCluster.StopAllSilos();
 }