Path: redb/redb.Tests.Integration/Tests/PostgresPro/PostgresProKeyCacheRepeatTests.cs Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Tests.Integration/Tests/PostgresPro/PostgresProKeyCacheRepeatTests.cs ---- using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using redb.Core.Pro.Extensions; using redb.Postgres.Pro.Extensions; using redb.Tests.Integration.Fixtures; using redb.Tests.Integration.Tests.Base; namespace redb.Tests.Integration.Tests.PostgresPro; [Collection("PostgresPro")] public class PostgresProKeyCacheRepeatTests : KeyCacheRepeatTestsBase { public PostgresProKeyCacheRepeatTests(PostgresProFixture fixture) { _ = fixture; } protected override ServiceProvider Build(string applicationName) { var config = new ConfigurationBuilder().AddJsonFile("appsettings.json").Build(); var cs = config.GetConnectionString("Postgres")! + $";Application Name={applicationName}"; var services = new ServiceCollection(); services.AddLogging(b => b.SetMinimumLevel(LogLevel.Warning)); services.AddRedbPro(options => { options.UsePostgres(cs).Configure(c => c.EnablePvtPrefilter = ProTestOptions.PvtPrefilter); if (config["Redb:License"] is { Length: > 0 } license) options.WithLicense(license); }); return services.BuildServiceProvider(); } protected override string SequenceTopSql => "SELECT last_value FROM global_identity"; protected override string SequenceRestartSql(long next) => $"SELECT setval('global_identity', {next - 1})"; }