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 fired events when initialMembersipListener is used on client #7543

Merged

Conversation

sancar
Copy link
Contributor

@sancar sancar commented Feb 18, 2016

When initial membership event added before client is started,
it was firing individual ADDED events for current memberlist,
along with InitialMembershipEvent. Only latter is preserved,
other events are removed.

Related tests are added.
Membershiplistener related tests in ClientRegressionWithMockNetworkTest
are moved to MembershipListenerTest.

fixes #7430

When initial membership event added before client is started,
it was firing individual ADDED events for current memberlist,
along with InitialMembershipEvent. Only latter is preserved,
other events are removed.

Related tests are added.
Membershiplistener related tests in ClientRegressionWithMockNetworkTest
are moved to MembershipListenerTest.

fixes hazelcast#7430
@sancar sancar self-assigned this Feb 18, 2016
@sancar sancar added this to the 3.7 milestone Feb 18, 2016
sancar pushed a commit to sancar/hazelcast that referenced this pull request Feb 18, 2016
When initial membership event added before client is started,
it was firing individual ADDED events for current memberlist,
along with InitialMembershipEvent. Only latter is preserved,
other events are removed.

Related tests are added.
Membershiplistener related tests in ClientRegressionWithMockNetworkTest
are moved to MembershipListenerTest.

fixes hazelcast#7430
backport of hazelcast#7543
* related to issue #1181
*/
@Test
public void testAddInitialMembership_whenListenerAddedViaClientConfig() throws InterruptedException {
Copy link
Contributor

Choose a reason for hiding this comment

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

why is there no assert? What is being tested?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before the fix, It was throwing NullPointer exception according to issue mentioned in #1181 . It is testing that it does not throw any exception.

@ihsandemir
Copy link
Contributor

👍

1 similar comment
@asimarslan
Copy link
Contributor

👍

asimarslan added a commit that referenced this pull request Feb 23, 2016
…master

Fix fired events when initialMembersipListener is used on client
@asimarslan asimarslan merged commit 6b2fbbc into hazelcast:master Feb 23, 2016
@sancar sancar deleted the fix/clientinitiaMembershipEvent/master branch March 1, 2016 07:26
@mmedenjak mmedenjak added the Source: Internal PR or issue was opened by an employee label Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Source: Internal PR or issue was opened by an employee Team: Client Type: Defect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Callback order and content of InitialMembershipEvent
4 participants