test(batch25): port gateway connect and tls baseline tests

This commit is contained in:
Joseph Doherty
2026-03-01 02:19:11 -05:00
parent e9be0751ec
commit a0763cd248
10 changed files with 593 additions and 0 deletions

View File

@@ -506,5 +506,28 @@ public sealed partial class ConcurrencyTests2
}
}
[Fact] // T:2490
public void NoRaceConnectionObjectReleased_ShouldSucceed()
{
var server = NatsServer.NewServer(new ServerOptions
{
Gateway = new GatewayOpts { Name = "A", Port = 5222 },
}).Server;
try
{
var outbound = new ClientConnection(ZB.MOM.NatsNet.Server.Internal.ClientKind.Gateway, server) { Cid = 42 };
server.RegisterOutboundGatewayConnection("B", outbound);
server.GetOutboundGatewayConnection("B").ShouldNotBeNull();
outbound.CloseConnection(ClosedState.ClientClosed);
outbound.IsClosed().ShouldBeTrue();
}
finally
{
server.Shutdown();
}
}
private static string NewRoot() => Path.Combine(Path.GetTempPath(), $"impl-fs-c2-{Guid.NewGuid():N}");
}