feat: execute post-baseline jetstream parity plan
This commit is contained in:
20
tests/NATS.Server.Tests/GatewayAdvancedSemanticsTests.cs
Normal file
20
tests/NATS.Server.Tests/GatewayAdvancedSemanticsTests.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using NATS.Server.Gateways;
|
||||
|
||||
namespace NATS.Server.Tests;
|
||||
|
||||
public class GatewayAdvancedSemanticsTests
|
||||
{
|
||||
[Fact]
|
||||
public void Gateway_forwarding_remaps_reply_subject_with_gr_prefix_and_restores_on_return()
|
||||
{
|
||||
const string originalReply = "_INBOX.123";
|
||||
const string clusterId = "CLUSTER-A";
|
||||
|
||||
var mapped = ReplyMapper.ToGatewayReply(originalReply, clusterId);
|
||||
mapped.ShouldStartWith("_GR_.");
|
||||
mapped.ShouldContain(clusterId);
|
||||
|
||||
ReplyMapper.TryRestoreGatewayReply(mapped, out var restored).ShouldBeTrue();
|
||||
restored.ShouldBe(originalReply);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user