Пример #1
0
        // Only 1 public constructor is allowed for test fixture.
        internal SqlDataStoreTestsFixture(string databaseName)
        {
            EnsureArg.IsNotNullOrEmpty(databaseName, nameof(databaseName));
            _databaseName = databaseName;
            string initialConnectionString = Environment.GetEnvironmentVariable("SqlServer:ConnectionString") ?? LocalConnectionString;

            _masterConnectionString = new SqlConnectionStringBuilder(initialConnectionString)
            {
                InitialCatalog = "master"
            }.ToString();
            TestConnectionString = new SqlConnectionStringBuilder(initialConnectionString)
            {
                InitialCatalog = _databaseName
            }.ToString();

            var config = new SqlServerDataStoreConfiguration
            {
                ConnectionString = TestConnectionString,
                Initialize       = true,
                SchemaOptions    = new SqlServerSchemaOptions
                {
                    AutomaticUpdatesEnabled = true,
                },
            };

            var scriptProvider = new ScriptProvider <SchemaVersion>();

            var baseScriptProvider = new BaseScriptProvider();

            var mediator = Substitute.For <IMediator>();

            var sqlConnectionStringProvider = new DefaultSqlConnectionStringProvider(config);

            var sqlConnectionFactory = new DefaultSqlConnectionFactory(sqlConnectionStringProvider);

            var schemaManagerDataStore = new SchemaManagerDataStore(sqlConnectionFactory);

            var schemaUpgradeRunner = new SchemaUpgradeRunner(scriptProvider, baseScriptProvider, mediator, NullLogger <SchemaUpgradeRunner> .Instance, sqlConnectionFactory, schemaManagerDataStore);

            var schemaInformation = new SchemaInformation(SchemaVersionConstants.Min, SchemaVersionConstants.Max);

            _schemaInitializer = new SchemaInitializer(config, schemaUpgradeRunner, schemaInformation, sqlConnectionFactory, sqlConnectionStringProvider, NullLogger <SchemaInitializer> .Instance);

            SqlTransactionHandler = new SqlTransactionHandler();

            SqlConnectionWrapperFactory = new SqlConnectionWrapperFactory(SqlTransactionHandler, new SqlCommandWrapperFactory(), sqlConnectionFactory);

            SqlIndexDataStoreFactory = new SqlIndexDataStoreFactory(
                schemaInformation,
                new[] { new SqlIndexDataStoreV1(SqlConnectionWrapperFactory), new SqlIndexDataStoreV2(SqlConnectionWrapperFactory) });

            InstanceStore = new SqlInstanceStore(SqlConnectionWrapperFactory);

            ExtendedQueryTagStore = new SqlExtendedQueryTagStore(SqlConnectionWrapperFactory, schemaInformation, NullLogger <SqlExtendedQueryTagStore> .Instance);

            TestHelper = new SqlIndexDataStoreTestHelper(TestConnectionString);
        }
Пример #2
0
        public SqlDataStoreTestsFixture()
        {
            string initialConnectionString = Environment.GetEnvironmentVariable("SqlServer:ConnectionString") ?? LocalConnectionString;

            _databaseName           = $"DICOMINTEGRATIONTEST_{DateTimeOffset.UtcNow.ToUnixTimeSeconds()}_{BigInteger.Abs(new BigInteger(Guid.NewGuid().ToByteArray()))}";
            _masterConnectionString = new SqlConnectionStringBuilder(initialConnectionString)
            {
                InitialCatalog = "master"
            }.ToString();
            TestConnectionString = new SqlConnectionStringBuilder(initialConnectionString)
            {
                InitialCatalog = _databaseName
            }.ToString();

            var config = new SqlServerDataStoreConfiguration
            {
                ConnectionString = TestConnectionString,
                Initialize       = true,
                SchemaOptions    = new SqlServerSchemaOptions
                {
                    AutomaticUpdatesEnabled = true,
                },
            };

            var scriptProvider = new ScriptProvider <SchemaVersion>();

            var baseScriptProvider = new BaseScriptProvider();

            var mediator = Substitute.For <IMediator>();

            var sqlConnectionStringProvider = new DefaultSqlConnectionStringProvider(config);

            var sqlConnectionFactory = new DefaultSqlConnectionFactory(sqlConnectionStringProvider);

            var schemaManagerDataStore = new SchemaManagerDataStore(sqlConnectionFactory);

            var schemaUpgradeRunner = new SchemaUpgradeRunner(scriptProvider, baseScriptProvider, mediator, NullLogger <SchemaUpgradeRunner> .Instance, sqlConnectionFactory, schemaManagerDataStore);

            var schemaInformation = new SchemaInformation((int)SchemaVersion.V1, (int)SchemaVersion.V1);

            _schemaInitializer = new SchemaInitializer(config, schemaUpgradeRunner, schemaInformation, sqlConnectionFactory, sqlConnectionStringProvider, NullLogger <SchemaInitializer> .Instance);

            var dicomSqlIndexSchema = new SqlIndexSchema(schemaInformation, NullLogger <SqlIndexSchema> .Instance);

            SqlTransactionHandler = new SqlTransactionHandler();

            SqlConnectionWrapperFactory = new SqlConnectionWrapperFactory(SqlTransactionHandler, new SqlCommandWrapperFactory(), sqlConnectionFactory);

            IndexDataStore = new SqlIndexDataStore(
                dicomSqlIndexSchema,
                SqlConnectionWrapperFactory);

            InstanceStore = new SqlInstanceStore(SqlConnectionWrapperFactory);

            TestHelper = new SqlIndexDataStoreTestHelper(TestConnectionString);
        }
Пример #3
0
        public async Task GivenValidSqlServerDataStoreConfiguration_GetSqlConnectionString_ReturnsConnectionString(string sqlConnectionString)
        {
            var sqlServerDataStoreConfiguration = new SqlServerDataStoreConfiguration()
            {
                ConnectionString = sqlConnectionString
            };
            ISqlConnectionStringProvider sqlConnectionStringProvider = new DefaultSqlConnectionStringProvider(sqlServerDataStoreConfiguration);

            Assert.Equal(sqlConnectionString, await sqlConnectionStringProvider.GetSqlConnectionString(CancellationToken.None));
        }
Пример #4
0
        public SqlServerFhirResourceChangeDataStore GetResourcChangeDataStoreWithGivenConnectionString(string connectionString)
        {
            var schemaOptions = new SqlServerSchemaOptions {
                AutomaticUpdatesEnabled = true
            };
            var config = Options.Create(new SqlServerDataStoreConfiguration {
                ConnectionString = connectionString, Initialize = true, SchemaOptions = schemaOptions, StatementTimeout = TimeSpan.FromMinutes(10)
            });
            var sqlConnectionStringProvider = new DefaultSqlConnectionStringProvider(config);
            var sqlConnectionBuilder        = new DefaultSqlConnectionBuilder(sqlConnectionStringProvider, config);
            var sqlConnectionWrapperFactory = new SqlConnectionWrapperFactory(new SqlTransactionHandler(), new SqlCommandWrapperFactory(), sqlConnectionBuilder);

            var schemaInformation = new SchemaInformation(SchemaVersionConstants.Min, SchemaVersionConstants.Max);

            schemaInformation.Current = SchemaVersionConstants.Max;

            return(new SqlServerFhirResourceChangeDataStore(sqlConnectionWrapperFactory, NullLogger <SqlServerFhirResourceChangeDataStore> .Instance, schemaInformation));
        }
Пример #5
0
        private async Task <(SqlServerFhirStorageTestHelper testHelper, SchemaUpgradeRunner upgradeRunner)> SetupTestHelperAndCreateDatabase(string databaseName, int maxSchemaVersion, bool forceIncrementalSchemaUpgrade)
        {
            var initialConnectionString = Environment.GetEnvironmentVariable("SqlServer:ConnectionString") ?? LocalConnectionString;

            var searchService = Substitute.For <ISearchService>();
            ISearchParameterDefinitionManager       defManager  = new SearchParameterDefinitionManager(ModelInfoProvider.Instance, Substitute.For <IMediator>(), () => searchService.CreateMockScope(), NullLogger <SearchParameterDefinitionManager> .Instance);
            FilebasedSearchParameterStatusDataStore statusStore = new FilebasedSearchParameterStatusDataStore(defManager, ModelInfoProvider.Instance);

            var schemaInformation = new SchemaInformation(SchemaVersionConstants.Min, maxSchemaVersion);

            var connectionString = new SqlConnectionStringBuilder(initialConnectionString)
            {
                InitialCatalog = databaseName
            }.ToString();

            var schemaOptions = new SqlServerSchemaOptions {
                AutomaticUpdatesEnabled = true
            };
            var config = new SqlServerDataStoreConfiguration {
                ConnectionString = connectionString, Initialize = true, SchemaOptions = schemaOptions
            };
            var sqlConnectionStringProvider = new DefaultSqlConnectionStringProvider(config);
            var securityConfiguration       = new SecurityConfiguration {
                PrincipalClaims = { "oid" }
            };

            SqlServerFhirModel sqlServerFhirModel = new SqlServerFhirModel(
                schemaInformation,
                defManager,
                () => statusStore,
                Options.Create(securityConfiguration),
                sqlConnectionStringProvider,
                Substitute.For <IMediator>(),
                NullLogger <SqlServerFhirModel> .Instance);

            var sqlConnectionFactory = new DefaultSqlConnectionFactory(sqlConnectionStringProvider);

            var testHelper = new SqlServerFhirStorageTestHelper(
                initialConnectionString,
                MasterDatabaseName,
                sqlServerFhirModel,
                sqlConnectionFactory);

            var scriptProvider     = new ScriptProvider <SchemaVersion>();
            var baseScriptProvider = new BaseScriptProvider();
            var mediator           = Substitute.For <IMediator>();

            var schemaManagerDataStore = new SchemaManagerDataStore(sqlConnectionFactory);
            var schemaUpgradeRunner    = new SchemaUpgradeRunner(
                scriptProvider,
                baseScriptProvider,
                NullLogger <SchemaUpgradeRunner> .Instance,
                sqlConnectionFactory,
                schemaManagerDataStore);

            var schemaInitializer = new SchemaInitializer(
                config,
                schemaUpgradeRunner,
                schemaInformation,
                sqlConnectionFactory,
                sqlConnectionStringProvider,
                mediator,
                NullLogger <SchemaInitializer> .Instance);

            await testHelper.CreateAndInitializeDatabase(
                databaseName,
                maxSchemaVersion,
                forceIncrementalSchemaUpgrade,
                schemaInitializer);

            return(testHelper, schemaUpgradeRunner);
        }
Пример #6
0
        internal SqlServerFhirStorageTestsFixture(int maximumSupportedSchemaVersion, string databaseName, IOptions <CoreFeatureConfiguration> coreFeatures = null)
        {
            var initialConnectionString = Environment.GetEnvironmentVariable("SqlServer:ConnectionString") ?? LocalConnectionString;

            _maximumSupportedSchemaVersion = maximumSupportedSchemaVersion;
            _databaseName        = databaseName;
            TestConnectionString = new SqlConnectionStringBuilder(initialConnectionString)
            {
                InitialCatalog = _databaseName
            }.ToString();

            var schemaOptions = new SqlServerSchemaOptions {
                AutomaticUpdatesEnabled = true
            };
            var config = Options.Create(new SqlServerDataStoreConfiguration {
                ConnectionString = TestConnectionString, Initialize = true, SchemaOptions = schemaOptions, StatementTimeout = TimeSpan.FromMinutes(10)
            });

            SchemaInformation = new SchemaInformation(SchemaVersionConstants.Min, maximumSupportedSchemaVersion);
            var scriptProvider      = new ScriptProvider <SchemaVersion>();
            var baseScriptProvider  = new BaseScriptProvider();
            var mediator            = Substitute.For <IMediator>();
            var sqlSortingValidator = new SqlServerSortingValidator(SchemaInformation);

            var sqlConnectionStringProvider = new DefaultSqlConnectionStringProvider(config);

            SqlConnectionFactory = new DefaultSqlConnectionFactory(sqlConnectionStringProvider);
            var schemaManagerDataStore = new SchemaManagerDataStore(SqlConnectionFactory, config, NullLogger <SchemaManagerDataStore> .Instance);

            _schemaUpgradeRunner = new SchemaUpgradeRunner(scriptProvider, baseScriptProvider, NullLogger <SchemaUpgradeRunner> .Instance, SqlConnectionFactory, schemaManagerDataStore);
            _schemaInitializer   = new SchemaInitializer(config, schemaManagerDataStore, _schemaUpgradeRunner, SchemaInformation, SqlConnectionFactory, sqlConnectionStringProvider, mediator, NullLogger <SchemaInitializer> .Instance);

            _searchParameterDefinitionManager = new SearchParameterDefinitionManager(ModelInfoProvider.Instance, _mediator, () => _searchService.CreateMockScope(), NullLogger <SearchParameterDefinitionManager> .Instance);

            _searchParameterDefinitionManager.StartAsync(CancellationToken.None);

            _filebasedSearchParameterStatusDataStore = new FilebasedSearchParameterStatusDataStore(_searchParameterDefinitionManager, ModelInfoProvider.Instance);

            var securityConfiguration = new SecurityConfiguration {
                PrincipalClaims = { "oid" }
            };

            var sqlServerFhirModel = new SqlServerFhirModel(
                SchemaInformation,
                _searchParameterDefinitionManager,
                () => _filebasedSearchParameterStatusDataStore,
                Options.Create(securityConfiguration),
                SqlConnectionFactory,
                Substitute.For <IMediator>(),
                NullLogger <SqlServerFhirModel> .Instance);

            SqlServerFhirModel = sqlServerFhirModel;

            var searchParameterToSearchValueTypeMap = new SearchParameterToSearchValueTypeMap();

            var serviceCollection = new ServiceCollection();

            serviceCollection.AddSqlServerTableRowParameterGenerators();
            serviceCollection.AddSingleton(sqlServerFhirModel);
            serviceCollection.AddSingleton <ISqlServerFhirModel>(sqlServerFhirModel);
            serviceCollection.AddSingleton(searchParameterToSearchValueTypeMap);

            ServiceProvider serviceProvider = serviceCollection.BuildServiceProvider();

            var upsertResourceTvpGeneratorV6           = serviceProvider.GetRequiredService <V6.UpsertResourceTvpGenerator <ResourceMetadata> >();
            var upsertResourceTvpGeneratorV7           = serviceProvider.GetRequiredService <V7.UpsertResourceTvpGenerator <ResourceMetadata> >();
            var upsertResourceTvpGeneratorV13          = serviceProvider.GetRequiredService <V13.UpsertResourceTvpGenerator <IReadOnlyList <ResourceWrapper> > >();
            var upsertResourceTvpGeneratorV17          = serviceProvider.GetRequiredService <V17.UpsertResourceTvpGenerator <IReadOnlyList <ResourceWrapper> > >();
            var upsertResourceTvpGeneratorVLatest      = serviceProvider.GetRequiredService <VLatest.UpsertResourceTvpGenerator <IReadOnlyList <ResourceWrapper> > >();
            var reindexResourceTvpGeneratorV17         = serviceProvider.GetRequiredService <V17.ReindexResourceTvpGenerator <IReadOnlyList <ResourceWrapper> > >();
            var bulkReindexResourceTvpGeneratorV17     = serviceProvider.GetRequiredService <V17.BulkReindexResourcesTvpGenerator <IReadOnlyList <ResourceWrapper> > >();
            var reindexResourceTvpGeneratorVLatest     = serviceProvider.GetRequiredService <VLatest.ReindexResourceTvpGenerator <IReadOnlyList <ResourceWrapper> > >();
            var bulkReindexResourceTvpGeneratorVLatest = serviceProvider.GetRequiredService <VLatest.BulkReindexResourcesTvpGenerator <IReadOnlyList <ResourceWrapper> > >();
            var upsertSearchParamsTvpGenerator         = serviceProvider.GetRequiredService <VLatest.UpsertSearchParamsTvpGenerator <List <ResourceSearchParameterStatus> > >();

            _supportedSearchParameterDefinitionManager = new SupportedSearchParameterDefinitionManager(_searchParameterDefinitionManager);

            SqlTransactionHandler       = new SqlTransactionHandler();
            SqlConnectionWrapperFactory = new SqlConnectionWrapperFactory(SqlTransactionHandler, new SqlCommandWrapperFactory(), SqlConnectionFactory);

            SqlServerSearchParameterStatusDataStore = new SqlServerSearchParameterStatusDataStore(
                () => SqlConnectionWrapperFactory.CreateMockScope(),
                upsertSearchParamsTvpGenerator,
                () => _filebasedSearchParameterStatusDataStore,
                SchemaInformation,
                sqlSortingValidator,
                sqlServerFhirModel,
                _searchParameterDefinitionManager);

            IOptions <CoreFeatureConfiguration> options = coreFeatures ?? Options.Create(new CoreFeatureConfiguration());

            _fhirDataStore = new SqlServerFhirDataStore(
                sqlServerFhirModel,
                searchParameterToSearchValueTypeMap,
                upsertResourceTvpGeneratorV6,
                upsertResourceTvpGeneratorV7,
                upsertResourceTvpGeneratorV13,
                upsertResourceTvpGeneratorV17,
                upsertResourceTvpGeneratorVLatest,
                reindexResourceTvpGeneratorV17,
                reindexResourceTvpGeneratorVLatest,
                bulkReindexResourceTvpGeneratorV17,
                bulkReindexResourceTvpGeneratorVLatest,
                options,
                SqlConnectionWrapperFactory,
                new CompressedRawResourceConverter(),
                NullLogger <SqlServerFhirDataStore> .Instance,
                SchemaInformation);

            _fhirOperationDataStore = new SqlServerFhirOperationDataStore(SqlConnectionWrapperFactory, NullLogger <SqlServerFhirOperationDataStore> .Instance);

            _fhirRequestContextAccessor.RequestContext.CorrelationId.Returns(Guid.NewGuid().ToString());
            _fhirRequestContextAccessor.RequestContext.RouteName.Returns("routeName");

            var searchableSearchParameterDefinitionManager = new SearchableSearchParameterDefinitionManager(_searchParameterDefinitionManager, _fhirRequestContextAccessor);
            var searchParameterExpressionParser            = new SearchParameterExpressionParser(new ReferenceSearchValueParser(_fhirRequestContextAccessor));
            var expressionParser = new ExpressionParser(() => searchableSearchParameterDefinitionManager, searchParameterExpressionParser);

            var searchOptionsFactory = new SearchOptionsFactory(
                expressionParser,
                () => searchableSearchParameterDefinitionManager,
                options,
                _fhirRequestContextAccessor,
                sqlSortingValidator,
                NullLogger <SearchOptionsFactory> .Instance);

            var searchParamTableExpressionQueryGeneratorFactory = new SearchParamTableExpressionQueryGeneratorFactory(searchParameterToSearchValueTypeMap);
            var sqlRootExpressionRewriter = new SqlRootExpressionRewriter(searchParamTableExpressionQueryGeneratorFactory);
            var chainFlatteningRewriter   = new ChainFlatteningRewriter(searchParamTableExpressionQueryGeneratorFactory);
            var sortRewriter = new SortRewriter(searchParamTableExpressionQueryGeneratorFactory);
            var partitionEliminationRewriter = new PartitionEliminationRewriter(sqlServerFhirModel, SchemaInformation, () => searchableSearchParameterDefinitionManager);

            _searchService = new SqlServerSearchService(
                searchOptionsFactory,
                _fhirDataStore,
                sqlServerFhirModel,
                sqlRootExpressionRewriter,
                chainFlatteningRewriter,
                sortRewriter,
                partitionEliminationRewriter,
                SqlConnectionWrapperFactory,
                SchemaInformation,
                _fhirRequestContextAccessor,
                new CompressedRawResourceConverter(),
                NullLogger <SqlServerSearchService> .Instance);

            ISearchParameterSupportResolver searchParameterSupportResolver = Substitute.For <ISearchParameterSupportResolver>();

            searchParameterSupportResolver.IsSearchParameterSupported(Arg.Any <SearchParameterInfo>()).Returns((true, false));

            _searchParameterStatusManager = new SearchParameterStatusManager(
                SqlServerSearchParameterStatusDataStore,
                _searchParameterDefinitionManager,
                searchParameterSupportResolver,
                mediator,
                NullLogger <SearchParameterStatusManager> .Instance);

            _testHelper = new SqlServerFhirStorageTestHelper(initialConnectionString, MasterDatabaseName, sqlServerFhirModel, SqlConnectionFactory);
        }
        internal SqlDataStoreTestsFixture(string databaseName, SchemaInformation schemaInformation)
        {
            DatabaseName      = EnsureArg.IsNotNullOrEmpty(databaseName, nameof(databaseName));
            SchemaInformation = EnsureArg.IsNotNull(schemaInformation, nameof(schemaInformation));

            IConfiguration environment = new ConfigurationBuilder()
                                         .AddEnvironmentVariables()
                                         .Build();

            string initialConnectionString = environment["SqlServer:ConnectionString"] ?? LocalConnectionString;

            _masterConnectionString = new SqlConnectionStringBuilder(initialConnectionString)
            {
                InitialCatalog = "master"
            }.ToString();
            TestConnectionString = new SqlConnectionStringBuilder(initialConnectionString)
            {
                InitialCatalog = DatabaseName
            }.ToString();

            var config = new SqlServerDataStoreConfiguration
            {
                ConnectionString = TestConnectionString,
                Initialize       = true,
                SchemaOptions    = new SqlServerSchemaOptions
                {
                    AutomaticUpdatesEnabled = true,
                },
            };

            IOptions <SqlServerDataStoreConfiguration> configOptions = Options.Create(config);

            var scriptProvider = new ScriptProvider <SchemaVersion>();

            var baseScriptProvider = new BaseScriptProvider();

            var mediator = Substitute.For <IMediator>();

            var sqlConnectionStringProvider = new DefaultSqlConnectionStringProvider(configOptions);

            var sqlConnectionFactory = new DefaultSqlConnectionFactory(sqlConnectionStringProvider);

            var schemaManagerDataStore = new SchemaManagerDataStore(sqlConnectionFactory, configOptions, NullLogger <SchemaManagerDataStore> .Instance);

            SchemaUpgradeRunner = new SchemaUpgradeRunner(scriptProvider, baseScriptProvider, NullLogger <SchemaUpgradeRunner> .Instance, sqlConnectionFactory, schemaManagerDataStore);

            _schemaInitializer = new SchemaInitializer(configOptions, schemaManagerDataStore, SchemaUpgradeRunner, SchemaInformation, sqlConnectionFactory, sqlConnectionStringProvider, mediator, NullLogger <SchemaInitializer> .Instance);

            SqlTransactionHandler = new SqlTransactionHandler();

            SqlConnectionWrapperFactory = new SqlConnectionWrapperFactory(SqlTransactionHandler, new SqlCommandWrapperFactory(), sqlConnectionFactory);

            var schemaResolver = new PassthroughSchemaVersionResolver(SchemaInformation);

            IndexDataStore = new SqlIndexDataStore(new VersionedCache <ISqlIndexDataStore>(
                                                       schemaResolver,
                                                       new[]
            {
                new SqlIndexDataStoreV1(SqlConnectionWrapperFactory),
                new SqlIndexDataStoreV2(SqlConnectionWrapperFactory),
                new SqlIndexDataStoreV3(SqlConnectionWrapperFactory),
                new SqlIndexDataStoreV4(SqlConnectionWrapperFactory),
                new SqlIndexDataStoreV5(SqlConnectionWrapperFactory),
                new SqlIndexDataStoreV6(SqlConnectionWrapperFactory),
            }));

            InstanceStore = new SqlInstanceStore(new VersionedCache <ISqlInstanceStore>(
                                                     schemaResolver,
                                                     new[]
            {
                new SqlInstanceStoreV1(SqlConnectionWrapperFactory),
                new SqlInstanceStoreV4(SqlConnectionWrapperFactory),
                new SqlInstanceStoreV6(SqlConnectionWrapperFactory),
            }));

            PartitionStore = new SqlPartitionStore(new VersionedCache <ISqlPartitionStore>(
                                                       schemaResolver,
                                                       new[]
            {
                new SqlPartitionStoreV6(SqlConnectionWrapperFactory),
            }));

            ExtendedQueryTagStore = new SqlExtendedQueryTagStore(new VersionedCache <ISqlExtendedQueryTagStore>(
                                                                     schemaResolver,
                                                                     new[]
            {
                new SqlExtendedQueryTagStoreV1(),
                new SqlExtendedQueryTagStoreV2(SqlConnectionWrapperFactory, NullLogger <SqlExtendedQueryTagStoreV2> .Instance),
                new SqlExtendedQueryTagStoreV4(SqlConnectionWrapperFactory, NullLogger <SqlExtendedQueryTagStoreV4> .Instance),
                new SqlExtendedQueryTagStoreV8(SqlConnectionWrapperFactory, NullLogger <SqlExtendedQueryTagStoreV8> .Instance),
            }));

            ExtendedQueryTagErrorStore = new SqlExtendedQueryTagErrorStore(new VersionedCache <ISqlExtendedQueryTagErrorStore>(
                                                                               schemaResolver,
                                                                               new[]
            {
                new SqlExtendedQueryTagErrorStoreV1(),
                new SqlExtendedQueryTagErrorStoreV4(SqlConnectionWrapperFactory, NullLogger <SqlExtendedQueryTagErrorStoreV4> .Instance),
                new SqlExtendedQueryTagErrorStoreV6(SqlConnectionWrapperFactory, NullLogger <SqlExtendedQueryTagErrorStoreV6> .Instance),
            }));
            IndexDataStoreTestHelper             = new SqlIndexDataStoreTestHelper(TestConnectionString);
            ExtendedQueryTagStoreTestHelper      = new ExtendedQueryTagStoreTestHelper(TestConnectionString);
            ExtendedQueryTagErrorStoreTestHelper = new ExtendedQueryTagErrorStoreTestHelper(TestConnectionString);
        }