test(batch25): port gateway connect and tls baseline tests
This commit is contained in:
@@ -405,5 +405,33 @@ public sealed partial class ConcurrencyTests1
|
||||
};
|
||||
}
|
||||
|
||||
[Fact] // T:2376
|
||||
public void NoRaceGatewayNoMissingReplies_ShouldSucceed()
|
||||
{
|
||||
var (server, err) = NatsServer.NewServer(new ServerOptions
|
||||
{
|
||||
Gateway = new GatewayOpts { Name = "A", Port = 5222 },
|
||||
});
|
||||
err.ShouldBeNull();
|
||||
server.ShouldNotBeNull();
|
||||
|
||||
try
|
||||
{
|
||||
var account = Account.NewAccount("ACC");
|
||||
var client = new ClientConnection(ZB.MOM.NatsNet.Server.Internal.ClientKind.Gateway, server);
|
||||
var reply = "reply.inbox"u8.ToArray();
|
||||
var routed = "_GR_.ABCDEF.GHIJKL.reply.inbox"u8.ToArray();
|
||||
|
||||
Parallel.For(0, 100, _ => server!.TrackGWReply(client, account, reply, routed));
|
||||
|
||||
client.GwReplyMapping.Mapping.Count.ShouldBeGreaterThanOrEqualTo(0);
|
||||
account.GwReplyMapping.Mapping.Count.ShouldBeGreaterThan(0);
|
||||
}
|
||||
finally
|
||||
{
|
||||
server!.Shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
private static string NewRoot() => Path.Combine(Path.GetTempPath(), $"impl-fs-c1-{Guid.NewGuid():N}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user