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

Fix Member Presence #607

Merged
merged 6 commits into from
Jan 21, 2021
Merged

Conversation

sacOO7
Copy link
Collaborator

@sacOO7 sacOO7 commented Sep 29, 2020

  • Updated wait logic during presence sync
  • Added check for the attached channel state while requesting for members
  • Added tests to make sure, the client returns the right members during intermittent detach cycles
  • Updated a few other tests
  • Fixes Presence blocking get sometimes has missing members #467

@QuintinWillison
Copy link
Contributor

Conflicts against main now on this one, @sacOO7 ... likely as a result of my recent changes in main. They were necessary however to get us wholesale moved over from tabs to spaces. Plus we now have Checkstyle! 🎉 (early days, only a few rules, but from acorns grow oak trees!)

@sacOO7
Copy link
Collaborator Author

sacOO7 commented Oct 1, 2020

Hi @QuintinWillison I will fix the conflicts and make PR again

sacOO7 added 3 commits October 3, 2020 22:45
# Conflicts:
#	lib/src/main/java/io/ably/lib/realtime/Presence.java
#	lib/src/test/java/io/ably/lib/test/realtime/RealtimePresenceTest.java
@vzhikserg vzhikserg assigned vzhikserg and sacOO7 and unassigned vzhikserg Oct 5, 2020
@vzhikserg vzhikserg added the bug Something isn't working. It's clear that this does need to be fixed. label Oct 5, 2020
lib/src/main/java/io/ably/lib/realtime/Presence.java Outdated Show resolved Hide resolved
@@ -1508,7 +1537,7 @@ public void onPresenceMessage(PresenceMessage message) {
leavePresenceWaiter.waitFor(ably1.options.clientId, Action.leave);

/* Validate that,
* - we received all actions
*- we received all actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change (and a few others) add noise. And, actually, in this case I think reduces readability of the comment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't usually add unnecessary code. I think this was added as a part of checkstyle run.

@@ -2598,7 +2627,7 @@ public void presence_state_change () {
try {
DebugOptions opts = new DebugOptions(testVars.keys[0].keyStr);
fillInOptions(opts);
opts.autoConnect = false; /* to queue presence messages */
opts.autoConnect = false; /* to queue presence messages */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this change? It's unrelated to the fix you've made as far as I can see. Same goes for one below. Just adds noise for reviewers. Please try to keep PRs clean. 🙂

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checkstyle related change

@QuintinWillison QuintinWillison merged commit 7cbf3dd into main Jan 21, 2021
@QuintinWillison QuintinWillison deleted the bugfix/467-missing-member-presence branch January 21, 2021 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. It's clear that this does need to be fixed.
Development

Successfully merging this pull request may close these issues.

Presence blocking get sometimes has missing members
3 participants