Exemplo n.º 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();
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        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;
     }
 }
Exemplo n.º 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();
 }
Exemplo n.º 9
0
 public void Teardown()
 {
     _host.StopAllSilos();
 }
Exemplo n.º 10
0
 public void Dispose()
 {
     _cluster.StopAllSilos();
 }
 public void Dispose()
 {
     Database.ExecuteAsync("FLUSHALL").Wait();
     Client.Dispose();
     Cluster.StopAllSilos();
 }
Exemplo n.º 12
0
 public void TearDown()
 {
     _testCluster.StopAllSilos();
 }
Exemplo n.º 13
0
 public void Dispose()
 {
     hostedCluster.StopAllSilos();
 }