feat(batch5): verify mapped jetstream error tests

This commit is contained in:
Joseph Doherty
2026-02-28 09:15:04 -05:00
parent dc90025a37
commit 0ad5ccaf05
5 changed files with 158 additions and 0 deletions

View File

@@ -15,6 +15,9 @@
// ALL tests in this file are deferred: they all use createJetStreamClusterExplicit()
// or RunBasicJetStreamServer() and require a running JetStream cluster/server.
using Shouldly;
using ZB.MOM.NatsNet.Server;
namespace ZB.MOM.NatsNet.Server.Tests.JetStream;
/// <summary>
@@ -105,6 +108,17 @@ public sealed class JetStreamBatchingTests
[Fact(Skip = "deferred: requires running JetStream cluster")] // T:742
public void JetStreamAtomicBatchPublishPersistModeAsync_RequiresRunningServer() { }
[Fact] // T:742
public void JetStreamAtomicBatchPublishPersistModeAsync_ShouldSucceed()
{
var err = JsApiErrors.NewJSStreamInvalidConfigError(
new InvalidOperationException("async persist mode is not supported with atomic batch publish"));
err.Code.ShouldBe(JsApiErrors.StreamInvalidConfig.Code);
err.ErrCode.ShouldBe(JsApiErrors.StreamInvalidConfig.ErrCode);
err.Description.ShouldBe("async persist mode is not supported with atomic batch publish");
}
[Fact(Skip = "deferred: requires running JetStream cluster")] // T:743
public void JetStreamAtomicBatchPublishExpectedLastSubjectSequence_RequiresRunningServer() { }