16 lines
491 B
C#
16 lines
491 B
C#
namespace NATS.Server.Tests;
|
|
|
|
public class JetStreamPublishPreconditionTests
|
|
{
|
|
[Fact]
|
|
public async Task Duplicate_msg_id_is_rejected_with_expected_error()
|
|
{
|
|
await using var fixture = await JetStreamApiFixture.StartWithStreamAsync("D", "d.*");
|
|
|
|
await fixture.PublishAndGetAckAsync("d.a", "x", msgId: "id-1");
|
|
var second = await fixture.PublishAndGetAckAsync("d.a", "x", msgId: "id-1", expectError: true);
|
|
|
|
second.ErrorCode.ShouldBe(10071);
|
|
}
|
|
}
|