Example #1
0
        protected BaseTestClusterFixture()
        {
            try
            {
                CheckPreconditionsOrThrow();
            }
            catch (Exception ex)
            {
                this.preconditionsException = ExceptionDispatchInfo.Capture(ex);
                return;
            }

            var builder = new TestClusterBuilder();

            TestDefaultConfiguration.ConfigureTestCluster(builder);
            builder.ConfigureLegacyConfiguration();
            ConfigureTestCluster(builder);

            var testCluster = builder.Build();

            if (testCluster?.Primary == null)
            {
                testCluster?.Deploy();
            }
            this.HostedCluster = testCluster;
            this.Logger        = this.Client?.ServiceProvider.GetRequiredService <ILoggerFactory>().CreateLogger("Application");
        }
Example #2
0
        public virtual async Task InitializeAsync()
        {
            var builder = new TestClusterBuilder();

            TestDefaultConfiguration.ConfigureTestCluster(builder);
            this.ConfigureTestCluster(builder);

            var testCluster = builder.Build();

            if (testCluster.Primary == null)
            {
                await testCluster.DeployAsync().ConfigureAwait(false);
            }

            this.HostedCluster = testCluster;
            this.logger        = this.Client.ServiceProvider.GetRequiredService <ILoggerFactory>().CreateLogger("Application");
        }
Example #3
0
        protected TestClusterPerTest()
        {
            var builder = new TestClusterBuilder();

            TestDefaultConfiguration.ConfigureTestCluster(builder);
            builder.ConfigureLegacyConfiguration();
            this.ConfigureTestCluster(builder);

            var testCluster = builder.Build();

            if (testCluster.Primary == null)
            {
                testCluster.Deploy();
            }
            this.HostedCluster = testCluster;
            this.logger        = this.Client.ServiceProvider.GetRequiredService <ILoggerFactory>().CreateLogger("Application");
        }
Example #4
0
        public DefaultClusterFixture()
        {
            var builder = new TestClusterBuilder();

            TestDefaultConfiguration.ConfigureTestCluster(builder);

            builder.AddSiloBuilderConfigurator <SiloHostConfigurator>();

            var testCluster = builder.Build();

            if (testCluster?.Primary == null)
            {
                testCluster?.Deploy();
            }

            this.HostedCluster = testCluster;
            this.Logger        = this.Client?.ServiceProvider.GetRequiredService <ILoggerFactory>().CreateLogger("Application");
        }