Rename 29 ImplBacklog test files from .Impltests.cs to .cs to match PortTracker class names

This commit is contained in:
Joseph Doherty
2026-02-28 06:56:52 -05:00
parent 523f86684b
commit f17d6c6bfb
29 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
using Shouldly;
using ZB.MOM.NatsNet.Server;
using ZB.MOM.NatsNet.Server.Internal;
namespace ZB.MOM.NatsNet.Server.Tests.ImplBacklog;
public sealed class JetStreamFileStoreTests
{
[Fact] // T:575
public void JetStreamFileStoreSubjectsRemovedAfterSecureErase_ShouldSucceed()
{
var root = Path.Combine(Path.GetTempPath(), $"impl-fs-{Guid.NewGuid():N}");
Directory.CreateDirectory(root);
JetStreamFileStore? fs = null;
try
{
fs = new JetStreamFileStore(
new FileStoreConfig { StoreDir = root },
new FileStreamInfo
{
Created = DateTime.UtcNow,
Config = new StreamConfig
{
Name = "TEST",
Storage = StorageType.FileStorage,
Subjects = ["test.*"],
},
});
fs.StoreMsg("test.1", null, "msg1"u8.ToArray(), 0).Seq.ShouldBe(1UL);
fs.StoreMsg("test.2", null, "msg2"u8.ToArray(), 0).Seq.ShouldBe(2UL);
fs.StoreMsg("test.3", null, "msg3"u8.ToArray(), 0).Seq.ShouldBe(3UL);
var before = fs.SubjectsTotals(">");
before.Count.ShouldBe(3);
before.ShouldContainKey("test.1");
before.ShouldContainKey("test.2");
before.ShouldContainKey("test.3");
var (removed, err) = fs.EraseMsg(1);
removed.ShouldBeTrue();
err.ShouldBeNull();
var after = fs.SubjectsTotals(">");
after.Count.ShouldBe(2);
after.ContainsKey("test.1").ShouldBeFalse();
after["test.2"].ShouldBe(1UL);
after["test.3"].ShouldBe(1UL);
}
finally
{
fs?.Stop();
Directory.Delete(root, recursive: true);
}
}
}