-
Notifications
You must be signed in to change notification settings - Fork 58
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
Send client state to cluster in re-connections[API-1644] #1415
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1415 +/- ##
==========================================
- Coverage 93.17% 93.14% -0.03%
==========================================
Files 465 465
Lines 16430 16431 +1
Branches 1337 1337
==========================================
- Hits 15308 15305 -3
- Misses 823 825 +2
- Partials 299 301 +2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a test? We cannot add split brain tests for obvious reasons but, can we add a test that will check if state is sent to the cluster after a reconnect? (could be in ClientReconnectTest, via using sinon spies/fakes)
Yes we should add this test to ensure that whether the state sent to cluster or not. I will add the test and send to PR. |
'hazelcast.client.heartbeat.timeout': 3000 | ||
} | ||
}); | ||
await RC.terminateMember(cluster.id, member.uuid); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await RC.terminateMember(cluster.id, member.uuid); | |
await TestUtil.waitForConnectionCount(client, 1); | |
await RC.terminateMember(cluster.id, member.uuid); |
@@ -59,6 +40,37 @@ describe('ClientReconnectTest', function () { | |||
await testFactory.shutdownAll(); | |||
}); | |||
|
|||
it('should send the client state to the cluster after reconnections, ' + | |||
+'regardless it is connected back to possibly the same cluster with the same id or not.', async function () { | |||
const fakeInitializeClientOnCluster = sandbox.replace( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note: This test will probably fail in backward compatibility tests as there is no client version filter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@harunalpak I overlooked this, can you add a version check?
Related PR: hazelcast/hazelcast#22164