Path: redb/redb.Tests.Integration/Tests/MsSqlPro/MsSqlProKeyCacheRepeatTests.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/MsSqlPro/MsSqlProKeyCacheRepeatTests.cs ---- using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using redb.Core.Pro.Extensions; using redb.MSSql.Pro.Extensions; using redb.Tests.Integration.Fixtures; using redb.Tests.Integration.Tests.Base; namespace redb.Tests.Integration.Tests.MsSqlPro; [Collection("MsSqlPro")] public class MsSqlProKeyCacheRepeatTests : KeyCacheRepeatTestsBase { public MsSqlProKeyCacheRepeatTests(MsSqlProFixture fixture) { _ = fixture; } protected override ServiceProvider Build(string applicationName) { var config = new ConfigurationBuilder().AddJsonFile("appsettings.json").Build(); var cs = config.GetConnectionString("MSSql")! + $";Application Name={applicationName}"; var services = new ServiceCollection(); services.AddLogging(b => b.SetMinimumLevel(LogLevel.Warning)); services.AddRedbPro(options => { options.UseMsSql(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 CAST(current_value AS bigint) FROM sys.sequences WHERE name = 'global_identity'"; protected override string SequenceRestartSql(long next) => $"ALTER SEQUENCE dbo.global_identity RESTART WITH {next}"; }