test(batch27): port wave-a cross-module jetstream tests
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user