-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[TEST] Add back necessary tests for deprecated settings that are replaced during applying inclusive naming #2825
[TEST] Add back necessary tests for deprecated settings that are replaced during applying inclusive naming #2825
Conversation
…aster role in node.roles setting Signed-off-by: Tianli Feng <[email protected]>
Signed-off-by: Tianli Feng <[email protected]>
Signed-off-by: Tianli Feng <[email protected]>
Signed-off-by: Tianli Feng <[email protected]>
Signed-off-by: Tianli Feng <[email protected]>
Signed-off-by: Tianli Feng <[email protected]>
Signed-off-by: Tianli Feng <[email protected]>
Signed-off-by: Tianli Feng <[email protected]>
Signed-off-by: Tianli Feng <[email protected]>
Signed-off-by: Tianli Feng <[email protected]>
Signed-off-by: Tianli Feng <[email protected]>
) | ||
); | ||
} | ||
|
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.
Note: These 2 tests in this class (ClusterBootstrapServiceTests
) are moved to the new class ClusterBootstrapServiceDeprecatedMasterTests
Signed-off-by: Tianli Feng <[email protected]>
I'm not sure if it's necessary to backport to |
@@ -144,6 +145,28 @@ public void testNodeCounts() { | |||
} | |||
} | |||
|
|||
// Validate assigning value "master" to setting "node.roles" can get correct count in Node Stats response after MASTER_ROLE deprecated. | |||
// TODO: Remove the test after removing MASTER_ROLE. |
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.
Nitpick - I don't think we need these TODOs alongside all of the tests. When we remove DiscoveryNodeRole.MASTER_ROLE
these tests would automatically break, so we would anyway resolve them then
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.
Hi @kartg Thanks for your review! 👍 I will remove the unnecessary TODOs.
The reason I added them is to giving a clear mind that it definitely can be removed. 😂
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.
Removed all the TODO in this PR, and I believe the comment of every newly added test is enough to make people understand they are only used to test the deprecated "master" role setting.
.build(); | ||
|
||
assertThat(makeRequestWithNodeDescriptions("_local").resolveVotingConfigExclusions(clusterState), contains(localNodeExclusion)); | ||
assertWarnings(AddVotingConfigExclusionsRequest.DEPRECATION_MESSAGE); |
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 assertion seems unnecessary for this test case - you can probably remove it
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.
👏 You are so careful that notice such detail! Good catch, I will try to replace with exceptWarnings()
, removing is not feasible, because any warnings can fail the test.
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.
@tlfeng let us know when this is ready
…e-deprecation Signed-off-by: Tianli Feng <[email protected]>
…ing() Signed-off-by: Tianli Feng <[email protected]>
…aced during applying inclusive naming (#2825) Signed-off-by: Tianli Feng <[email protected]> (cherry picked from commit 00c0bf2)
…aced during applying inclusive naming (#2825) (#3353) Signed-off-by: Tianli Feng <[email protected]> (cherry picked from commit 00c0bf2)
There is a test failure in log 4816:
The assertion failed: OpenSearch/server/src/test/java/org/opensearch/cluster/node/DiscoveryNodeTests.java Line 183 in 00c0bf2
I will resolve the issue in PR #3441 |
Description
Add some unit tests for validating the backwards compatibility of deprecated
master
node role andcluster.initial_master_nodes
setting.All the added tests are modified copies of existing tests.
The old node role/setting name in tests were replaced by new node role/setting name in PR #2424 and #2451, and in this PR I added some duplicate tests for the deprecated node role/setting name.
Reason:
To avoid the backwards compatibility of the deprecated setting is broken by mistake during the process of replacing non-inclusive terminology.
There was an issue #2769 that shown a fault caused by PR #2463 (Deprecate setting 'cluster.initial_master_nodes' and introduce the alternative setting 'cluster.initial_cluster_manager_nodes' ).
Issues Resolved
Resolve #2805
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.