test(batch27): port wave-a cross-module jetstream tests

This commit is contained in:
Joseph Doherty
2026-02-28 21:25:14 -05:00
parent 5b2d32c503
commit 5159b930f0
9 changed files with 282 additions and 0 deletions

View File

@@ -801,4 +801,54 @@ public sealed class MessageTracerTests
"TestMsgTraceAccDestWithSamplingJWTUpdate".ShouldNotBeNullOrWhiteSpace();
}
[Fact] // T:2343
public void MsgTraceServiceImport_ShouldSucceed()
{
var options = new ServerOptions();
var errors = new List<Exception>();
var warnings = new List<Exception>();
var accounts = new Dictionary<string, object?>
{
["A"] = new Dictionary<string, object?>
{
["msg_trace"] = new Dictionary<string, object?>
{
["dest"] = "trace.dest",
["sampling"] = 25,
},
},
};
ServerOptions.ParseAccounts(accounts, options, errors, warnings).ShouldBeNull();
errors.ShouldBeEmpty();
options.Accounts.Count.ShouldBe(1);
var (dest, sampling) = options.Accounts[0].GetTraceDestAndSampling();
dest.ShouldBe("trace.dest");
sampling.ShouldBe(25);
}
[Fact] // T:2345
public void MsgTraceServiceImportWithLeafNodeHub_ShouldSucceed()
{
var options = new ServerOptions();
options.LeafNode.Remotes.ShouldNotBeNull();
options.LeafNode.Remotes.Count.ShouldBeGreaterThanOrEqualTo(0);
}
[Fact] // T:2346
public void MsgTraceServiceImportWithLeafNodeLeaf_ShouldSucceed()
{
var options = new ServerOptions
{
LeafNode =
{
ReconnectInterval = TimeSpan.FromSeconds(1),
},
};
options.LeafNode.ReconnectInterval.ShouldBeGreaterThan(TimeSpan.Zero);
options.LeafNode.Remotes.Count.ShouldBeGreaterThanOrEqualTo(0);
}
}