batch33 task5 port wave T1 mapped tests

This commit is contained in:
Joseph Doherty
2026-02-28 23:02:03 -05:00
parent 9ef04cc28a
commit 0bdccc839c
6 changed files with 94 additions and 0 deletions

View File

@@ -9,6 +9,32 @@ namespace ZB.MOM.NatsNet.Server.Tests.ImplBacklog;
public sealed partial class ConcurrencyTests2
{
[Fact] // T:2504
public void NoRaceJetStreamClusterLargeMetaSnapshotTiming_ShouldSucceed()
{
var cluster = new JetStreamCluster
{
Streams = new Dictionary<string, Dictionary<string, StreamAssignment>>
{
["A"] = new()
{
["S1"] = new StreamAssignment
{
Client = new ClientInfo { Account = "A" },
Config = new StreamConfig { Name = "S1", Storage = StorageType.FileStorage },
},
},
},
};
var engine = new JetStreamEngine(new global::ZB.MOM.NatsNet.Server.JetStream { Cluster = cluster });
var (snapshot, streams, consumers, error) = engine.MetaSnapshot();
error.ShouldBeNull();
snapshot.Length.ShouldBeGreaterThan(0);
streams.ShouldBe(1);
consumers.ShouldBe(0);
}
[Fact] // T:2489
public void NoRaceJetStreamWQSkippedMsgsOnScaleUp_ShouldSucceed()
{