protected SqlStatisticsPublisherTestsBase(ConnectionStringFixture fixture, TestEnvironmentFixture environment)
        {
            this.environment   = environment;
            this.loggerFactory = TestingUtils.CreateDefaultLoggerFactory($"{this.GetType()}.log");
            logger             = new LoggerWrapper <SqlStatisticsPublisherTestsBase>(loggerFactory);

            fixture.InitializeConnectionStringAccessor(GetConnectionString);

            ConnectionString = fixture.ConnectionString;

            StatisticsPublisher = new SqlStatisticsPublisher();
            StatisticsPublisher.Init("Test", new StatisticsPublisherProviderRuntime(logger),
                                     new StatisticsPublisherProviderConfig(AdoInvariant, ConnectionString)).Wait();
        }
        protected SqlStatisticsPublisherTestsBase(ConnectionStringFixture fixture, TestEnvironmentFixture environment)
        {
            this.environment = environment;
            LogManager.Initialize(new NodeConfiguration());
            logger = LogManager.GetLogger(GetType().Name, LoggerType.Application);

            fixture.InitializeConnectionStringAccessor(GetConnectionString);

            ConnectionString = fixture.ConnectionString;

            StatisticsPublisher = new SqlStatisticsPublisher();
            StatisticsPublisher.Init("Test", new StatisticsPublisherProviderRuntime(logger),
                                     new StatisticsPublisherProviderConfig(AdoInvariant, ConnectionString)).Wait();
        }
Beispiel #3
0
        protected SqlStatisticsPublisherTestsBase(ConnectionStringFixture fixture)
        {
            TraceLogger.Initialize(new NodeConfiguration());
            logger = TraceLogger.GetLogger(GetType().Name, TraceLogger.LoggerType.Application);

            lock (fixture.SyncRoot)
            {
                if (fixture.ConnectionString == null)
                {
                    fixture.ConnectionString = RelationalStorageForTesting.SetupInstance(AdoInvariant, testDatabaseName)
                                               .Result.CurrentConnectionString;
                }
            }

            ConnectionString = fixture.ConnectionString;

            StatisticsPublisher = new SqlStatisticsPublisher();
            StatisticsPublisher.Init("Test", new StatisticsPublisherProviderRuntime(logger),
                                     new StatisticsPublisherProviderConfig(AdoInvariant, ConnectionString)).Wait();
        }
Beispiel #4
0
 private async Task Initialize()
 {
     statisticsPublisher = new SqlStatisticsPublisher();
     await statisticsPublisher.Init("Test", new StatisticsPublisherProviderRuntime(logger),
                                    new StatisticsPublisherProviderConfig(adoInvariant, connectionString));
 }
Beispiel #5
0
 public async Task Initialize()
 {
     StatisticsPublisher = new SqlStatisticsPublisher();
     await StatisticsPublisher.Init("Test", new StatisticsPublisherProviderRuntime(Logger),
                                    new StatisticsPublisherProviderConfig(AdoInvariant, ConnectionString));
 }