Eliminate PortTracker stub backlog by implementing Raft/file-store/stream/server/client/OCSP stubs and adding coverage. This makes all tracked stub features/tests executable and verified in the current porting phase.

This commit is contained in:
Joseph Doherty
2026-02-27 08:56:26 -05:00
parent ba4f41cf71
commit 8849265780
33 changed files with 2938 additions and 407 deletions

View File

@@ -0,0 +1,31 @@
// Copyright 2012-2026 The NATS Authors
// Licensed under the Apache License, Version 2.0
using Shouldly;
using ZB.MOM.NatsNet.Server;
namespace ZB.MOM.NatsNet.Server.Tests.JetStream;
public sealed class WaitQueueTests
{
[Fact]
public void Add_Peek_Pop_IsFull_ShouldBehaveAsFifo()
{
var q = new WaitQueue();
q.Peek().ShouldBeNull();
q.Pop().ShouldBeNull();
q.Add(new WaitingRequest { Subject = "A", N = 1 });
q.Add(new WaitingRequest { Subject = "B", N = 2 });
q.Len.ShouldBe(2);
q.IsFull(2).ShouldBeTrue();
q.Peek()!.Subject.ShouldBe("A");
q.Pop()!.Subject.ShouldBe("A");
q.Pop()!.Subject.ShouldBe("B");
q.Len.ShouldBe(0);
q.IsFull(1).ShouldBeFalse();
}
}