public async Task <PostgresStreamStoreFixture> Get(
            ITestOutputHelper outputHelper,
            string schema = "dbo")
        {
            var fixturePool = _fixturePoolBySchema.GetOrAdd(
                schema,
                _ => new ConcurrentQueue <PostgresStreamStoreFixture>());

            if (!fixturePool.TryDequeue(out var fixture))
            {
                var databaseName   = $"test_{Guid.NewGuid():n}";
                var dockerInstance = new PostgresDockerDatabaseManager(outputHelper, databaseName);
                await dockerInstance.CreateDatabase();

                fixture = new PostgresStreamStoreFixture(
                    schema,
                    dockerInstance,
                    databaseName,
                    onDispose: () => fixturePool.Enqueue(fixture));

                outputHelper.WriteLine($"Using new fixture with db {databaseName}");
            }
            else
            {
                outputHelper.WriteLine($"Using pooled fixture with db {fixture.DatabaseName}");
            }

            await fixture.Prepare();

            return(fixture);
        }
        public PostgresStreamStoreFixture(
            string schema,
            PostgresDockerDatabaseManager dockerInstance,
            string databaseName,
            Action onDispose)
        {
            _onDispose = onDispose;

            DatabaseName = databaseName;
            var connectionString = dockerInstance.ConnectionString;

            _settings = new PostgresStreamStoreSettings(connectionString)
            {
                Schema    = schema,
                GetUtcNow = () => GetUtcNow(),
                DisableDeletionTracking = false,
                ScavengeAsynchronously  = false,
            };
        }