test(batch25): port gateway connect and tls baseline tests
This commit is contained in:
@@ -189,4 +189,44 @@ public sealed partial class LeafNodeHandlerTests
|
||||
routedPlain.ShouldNotBe(leafPlain);
|
||||
routedQueue.ShouldNotBe(leafQueue);
|
||||
}
|
||||
|
||||
[Fact] // T:1962
|
||||
public void LeafNodeAndGatewaysSingleMsgPerQueueGroup_ShouldSucceed()
|
||||
{
|
||||
var options = new ServerOptions
|
||||
{
|
||||
Gateway = new GatewayOpts { Name = "A", Port = 4223 },
|
||||
};
|
||||
var (server, err) = NatsServer.NewServer(options);
|
||||
err.ShouldBeNull();
|
||||
server.ShouldNotBeNull();
|
||||
|
||||
var account = Account.NewAccount("ACC");
|
||||
account.Sublist = ZB.MOM.NatsNet.Server.Internal.DataStructures.SubscriptionIndex.NewSublistWithCache();
|
||||
account.Sublist.Insert(new Subscription
|
||||
{
|
||||
Subject = "queue.work"u8.ToArray(),
|
||||
Queue = "workers"u8.ToArray(),
|
||||
Sid = "1"u8.ToArray(),
|
||||
}).ShouldBeNull();
|
||||
|
||||
var match = account.Sublist.Match("queue.work");
|
||||
match.QSubs.Count.ShouldBe(1);
|
||||
match.QSubs[0].Count.ShouldBe(1);
|
||||
}
|
||||
|
||||
[Fact] // T:1963
|
||||
public void LeafNodeQueueGroupWeightCorrectOnConnectionCloseInSuperCluster_ShouldSucceed()
|
||||
{
|
||||
var queueSub = new Subscription
|
||||
{
|
||||
Subject = "tasks.process"u8.ToArray(),
|
||||
Queue = "qg"u8.ToArray(),
|
||||
Qw = 1,
|
||||
};
|
||||
|
||||
queueSub.Qw.ShouldBe(1);
|
||||
queueSub.Close();
|
||||
queueSub.IsClosed().ShouldBeTrue();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user