test(batch25): port gateway connect and tls baseline tests
This commit is contained in:
@@ -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}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user