fix: preserve SDK 2.0 client value and lifetime contracts
This commit is contained in:
@@ -40,7 +40,7 @@ internal sealed class FakeSessionFactory : ISessionFactory
|
||||
uint sessionTimeoutMs, UserIdentity identity, CancellationToken ct)
|
||||
{
|
||||
CreateCallCount++;
|
||||
LastEndpointUrl = endpoint.EndpointUrl;
|
||||
LastEndpointUrl = endpoint.EndpointUrl ?? string.Empty;
|
||||
|
||||
// One-shot: the gate holds only the call that observed it, so a later call (e.g. a user's Connect while a
|
||||
// failover is held) runs freely.
|
||||
@@ -60,14 +60,14 @@ internal sealed class FakeSessionFactory : ISessionFactory
|
||||
else
|
||||
session = new FakeSessionAdapter
|
||||
{
|
||||
EndpointUrl = endpoint.EndpointUrl,
|
||||
ServerName = endpoint.Server?.ApplicationName?.Text ?? "FakeServer",
|
||||
EndpointUrl = endpoint.EndpointUrl ?? string.Empty,
|
||||
ServerName = endpoint.Server?.ApplicationName.Text ?? "FakeServer",
|
||||
SecurityMode = endpoint.SecurityMode.ToString(),
|
||||
SecurityPolicyUri = endpoint.SecurityPolicyUri ?? string.Empty
|
||||
};
|
||||
|
||||
// Ensure endpoint URL matches
|
||||
session.EndpointUrl = endpoint.EndpointUrl;
|
||||
session.EndpointUrl = endpoint.EndpointUrl ?? string.Empty;
|
||||
_createdSessions.Add(session);
|
||||
return session;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user