示例#1
0
        protected override IMembershipTable CreateMembershipTable(ILogger logger)
        {
            ConsulTestUtils.EnsureConsul();
            var options = new ConsulClusteringSiloOptions()
            {
                Address = new Uri(this.connectionString)
            };

            return(new ConsulBasedMembershipTable(loggerFactory.CreateLogger <ConsulBasedMembershipTable>(), Options.Create(options), this.clusterOptions));
        }
示例#2
0
        protected override IGatewayListProvider CreateGatewayListProvider(ILogger logger)
        {
            ConsulTestUtils.EnsureConsul();
            var options = new ConsulClusteringClientOptions()
            {
                Address = new Uri(this.connectionString)
            };

            return(new ConsulGatewayListProvider(loggerFactory.CreateLogger <ConsulGatewayListProvider>(), Options.Create(options), this.gatewayOptions, this.clusterOptions));
        }
        protected override IMembershipTable CreateMembershipTable(Logger logger)
        {
            ConsulTestUtils.EnsureConsul();
            var options = new ConsulMembershipOptions()
            {
                Address = new Uri(this.connectionString)
            };

            return(new ConsulBasedMembershipTable(loggerFactory.CreateLogger <ConsulBasedMembershipTable>(), Options.Create <ConsulMembershipOptions>(options), this.globalConfiguration));
        }
示例#4
0
        public override TestCluster CreateTestCluster()
        {
            ConsulTestUtils.EnsureConsul();

            var options = new TestClusterOptions(2);

            options.ClusterConfiguration.Globals.DataConnectionString = ConsulTestUtils.CONSUL_ENDPOINT;
            options.ClusterConfiguration.Globals.ReminderServiceType  = GlobalConfiguration.ReminderServiceProviderType.Disabled;
            options.ClusterConfiguration.PrimaryNode = null;
            options.ClusterConfiguration.Globals.SeedNodes.Clear();
            return(new TestCluster(options).UseSiloBuilderFactory <SiloBuilderFactory>()
                   .UseClientBuilderFactory(clientBuilderFactory));
        }
示例#5
0
 protected override void ConfigureTestCluster(TestClusterBuilder builder)
 {
     ConsulTestUtils.EnsureConsul();
     builder.ConfigureLegacyConfiguration(legacy =>
     {
         legacy.ClusterConfiguration.Globals.DataConnectionString = ConsulTestUtils.CONSUL_ENDPOINT;
         legacy.ClusterConfiguration.Globals.ReminderServiceType  = GlobalConfiguration.ReminderServiceProviderType.Disabled;
         legacy.ClusterConfiguration.PrimaryNode = null;
         legacy.ClusterConfiguration.Globals.SeedNodes.Clear();
     });
     builder.AddSiloBuilderConfigurator <SiloBuilderConfigurator>();
     builder.AddClientBuilderConfigurator <ClientBuilderConfigurator>();
 }
示例#6
0
        public override TestCluster CreateTestCluster()
        {
            ConsulTestUtils.EnsureConsul();

            var options = new TestClusterOptions(2);

            options.ClusterConfiguration.Globals.DataConnectionString    = ConsulTestUtils.CONSUL_ENDPOINT;
            options.ClusterConfiguration.Globals.LivenessType            = GlobalConfiguration.LivenessProviderType.Custom;
            options.ClusterConfiguration.Globals.MembershipTableAssembly = "OrleansConsulUtils";
            options.ClusterConfiguration.Globals.ReminderServiceType     = GlobalConfiguration.ReminderServiceProviderType.Disabled;
            options.ClusterConfiguration.PrimaryNode = null;
            options.ClusterConfiguration.Globals.SeedNodes.Clear();
            return(new TestCluster(options));
        }
示例#7
0
 protected override async Task <string> GetConnectionString()
 {
     return(await ConsulTestUtils.EnsureConsulAsync() ? ConsulTestUtils.CONSUL_ENDPOINT : null);
 }
        protected override IGatewayListProvider CreateGatewayListProvider(Logger logger)
        {
            ConsulTestUtils.EnsureConsul();

            return(new ConsulBasedMembershipTable(loggerFactory.CreateLogger <ConsulBasedMembershipTable>()));
        }
        protected override IMembershipTable CreateMembershipTable(Logger logger)
        {
            ConsulTestUtils.EnsureConsul();

            return(new ConsulBasedMembershipTable(loggerFactory.CreateLogger <ConsulBasedMembershipTable>()));
        }
示例#10
0
 protected override void ConfigureTestCluster(TestClusterBuilder builder)
 {
     ConsulTestUtils.EnsureConsul();
     builder.AddSiloBuilderConfigurator <SiloBuilderConfigurator>();
     builder.AddClientBuilderConfigurator <ClientBuilderConfigurator>();
 }