docs: add XML doc comments to server types and fix flaky test timings
Add XML doc comments to public properties across EventTypes, Connz, Varz, NatsOptions, StreamConfig, IStreamStore, FileStore, MqttListener, MqttSessionStore, MessageTraceContext, and JetStreamApiResponse. Fix flaky tests by increasing timing margins (ResponseTracker expiry 1ms→50ms, sleep 50ms→200ms) and document known flaky test patterns in tests.md.
This commit is contained in:
@@ -491,7 +491,7 @@ public class ConcurrencyStressTests
|
||||
for (var i = 0; i < 10; i++)
|
||||
{
|
||||
streamManager.Purge("PURGECONC");
|
||||
Thread.Sleep(1);
|
||||
Thread.Sleep(5);
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { errors.Add(ex); }
|
||||
|
||||
@@ -32,19 +32,19 @@ public class ResponseTrackerTests
|
||||
[Fact]
|
||||
public void Enforces_expiry()
|
||||
{
|
||||
var tracker = new ResponseTracker(maxMsgs: 0, expires: TimeSpan.FromMilliseconds(1));
|
||||
var tracker = new ResponseTracker(maxMsgs: 0, expires: TimeSpan.FromMilliseconds(50));
|
||||
tracker.RegisterReply("_INBOX.abc");
|
||||
Thread.Sleep(50);
|
||||
Thread.Sleep(200);
|
||||
tracker.IsReplyAllowed("_INBOX.abc").ShouldBeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Prune_removes_expired()
|
||||
{
|
||||
var tracker = new ResponseTracker(maxMsgs: 0, expires: TimeSpan.FromMilliseconds(1));
|
||||
var tracker = new ResponseTracker(maxMsgs: 0, expires: TimeSpan.FromMilliseconds(50));
|
||||
tracker.RegisterReply("_INBOX.a");
|
||||
tracker.RegisterReply("_INBOX.b");
|
||||
Thread.Sleep(50);
|
||||
Thread.Sleep(200);
|
||||
tracker.Prune();
|
||||
tracker.Count.ShouldBe(0);
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ public class ClusterStressTests
|
||||
for (var i = 0; i < 5; i++)
|
||||
{
|
||||
meta.StepDown();
|
||||
Thread.Sleep(2);
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { errors.Add(ex); }
|
||||
|
||||
Reference in New Issue
Block a user