Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PersistentSubscriptionsManager missaligned with the api, should it be unit tested ? #73

Open
jrouaix opened this issue Apr 29, 2020 · 2 comments

Comments

@jrouaix
Copy link

jrouaix commented Apr 29, 2020

Describe the bug
Hello, trying to use PersistentSubscriptionsManager and the object model PersistentSubscriptionDetails is actually not aligned with the actual api payload so the connections list is null, and there is no way to get the connections count.

To Reproduce
Steps to reproduce the behavior:

var cred = new UserCredentials("user", "pass");
var endpoint = new IPEndPoint(/* master_ip */, /* master_http_port */);
var subsMan = new PersistentSubscriptionsManager(_gesLogger, endpoint, TimeSpan.FromSeconds(1));
var list = await subsMan.List(cred).CAF();

var count = list.First().Connections.Count; // NullRefException !

Expected behavior
The client nuget should have same model than the actual API payload.

Config/Logs/Screenshots

image

EventStore details

  • EventStore server version:
    Event Store 5.0.5.0
  • Operating system:
    ES server in a container / dotnet client on windows
  • EventStore client version (if applicable):
    5.0.5
@hayley-jean
Copy link
Member

hayley-jean commented May 4, 2020

Hi @jrouaix, according to the comments in the client code, Connections is only populated when the details are fetched through the Describe method and will be null when fetched through the List method.

I've changed the label from bug to enhancement, as we could improve the api around the persistent subscription manager in the tcp client.

@jrouaix
Copy link
Author

jrouaix commented May 14, 2020

Ho, you're right @hayley-jean.
Still perhaps you can just embody the connectionCount data in a property ?

@ylorph ylorph transferred this issue from EventStore/EventStore Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants