feat: add new NatsOptions fields for Go config parity
Adds 10 new fields to NatsOptions (ClientAdvertise, TraceVerbose, MaxTracedMsgLen, DisableSublistCache, ConnectErrorReports, ReconnectErrorReports, NoHeaderSupport, MaxClosedClients, NoSystemAccount, SystemAccount) plus InCmdLine tracking set. Moves MaxClosedClients from a private constant in NatsServer to a configurable option.
This commit is contained in:
@@ -14,4 +14,20 @@ public class NatsOptionsTests
|
||||
opts.LogSizeLimit.ShouldBe(0L);
|
||||
opts.Tags.ShouldBeNull();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void New_fields_have_correct_defaults()
|
||||
{
|
||||
var opts = new NatsOptions();
|
||||
opts.ClientAdvertise.ShouldBeNull();
|
||||
opts.TraceVerbose.ShouldBeFalse();
|
||||
opts.MaxTracedMsgLen.ShouldBe(0);
|
||||
opts.DisableSublistCache.ShouldBeFalse();
|
||||
opts.ConnectErrorReports.ShouldBe(3600);
|
||||
opts.ReconnectErrorReports.ShouldBe(1);
|
||||
opts.NoHeaderSupport.ShouldBeFalse();
|
||||
opts.MaxClosedClients.ShouldBe(10_000);
|
||||
opts.NoSystemAccount.ShouldBeFalse();
|
||||
opts.SystemAccount.ShouldBeNull();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user