-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Migrate ZenDiscoveryIT to Zen2 #37465
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
Conversation
|
Pinging @elastic/es-distributed |
|
|
||
| assertThat(holder.get(), notNullValue()); | ||
| assertThat(holder.get().getMessage(), equalTo("failure when sending a validation request to node")); | ||
| transportService.sendRequest(node, PublicationTransportHandler.PUBLISH_STATE_ACTION_NAME, |
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.
this is not the situation where we handle a join anymore but cluster state publishing?
The goal of this test was to make sure that join validation ensures that the node can understand the cluster state before being added to the cluster by the master.
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.
Sorry, actually I did not get what the test is supposed to do.
Now it's clear that it should check failing JoinValidation.
I still think that ZenDiscoveryIT is a better place for this test than CoordinatorTests because there is no easy way to force the master node to send state to joining node, which deserialization will fail. However, to have it in ZenDiscoveryIT I had to extract one method in Coordinator and make it public for tests (similarly we were calling zenDiscovery.handleJoinRequest previously).
ae39525
|
@ywelsch I've made necessary, please have a second look. |
|
run elasticsearch-ci/1 |
| } | ||
|
|
||
| // public for tests | ||
| public void sendValidateJoinRequest(ClusterState stateForJoinValidation, JoinRequest joinRequest, |
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.
can you move this test to the same package as coordinator, and make this method package-visible instead?
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.
Sure
ZenDiscoveryIT contained 5 tests. 3 run without changes, testNodeRejectsClusterStateWithWrongMasterNode removed, testHandleNodeJoin_incompatibleClusterState changed.