Add batch 32 JS cluster meta backlog test mappings

This commit is contained in:
Joseph Doherty
2026-02-28 22:30:41 -05:00
parent 7e8b81b648
commit 34bc4e1137
12 changed files with 616 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
using System.Collections.Concurrent;
using System.Diagnostics;
using System.Reflection;
using NSubstitute;
using Shouldly;
using ZB.MOM.NatsNet.Server;
@@ -8,6 +9,26 @@ namespace ZB.MOM.NatsNet.Server.Tests.ImplBacklog;
public sealed partial class ConcurrencyTests2
{
[Fact] // T:2489
public void NoRaceJetStreamWQSkippedMsgsOnScaleUp_ShouldSucceed()
{
var group = new RaftGroup { Peers = ["N1"] };
var cluster = new JetStreamCluster
{
Meta = Substitute.For<IRaftNode>(),
Streams = new Dictionary<string, Dictionary<string, StreamAssignment>>
{
["A"] = new Dictionary<string, StreamAssignment>
{
["WQ"] = new() { Group = group },
},
},
};
cluster.Meta!.ID().Returns("N1");
cluster.IsStreamLeader("A", "WQ").ShouldBeTrue();
}
[Fact] // T:2505
public void NoRaceStoreReverseWalkWithDeletesPerf_ShouldSucceed()
{