[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 <ftianli@amazon.com>
Signed-off-by: Tianli Feng <ftianli@amazon.com>
Signed-off-by: Tianli Feng <ftianli@amazon.com>
Signed-off-by: Tianli Feng <ftianli@amazon.com>
Signed-off-by: Tianli Feng <ftianli@amazon.com>
Signed-off-by: Tianli Feng <ftianli@amazon.com>
Signed-off-by: Tianli Feng <ftianli@amazon.com>
Signed-off-by: Tianli Feng <ftianli@amazon.com>
Signed-off-by: Tianli Feng <ftianli@amazon.com>
Signed-off-by: Tianli Feng <ftianli@amazon.com>
Signed-off-by: Tianli Feng <ftianli@amazon.com>
| ) | ||
| ); | ||
| } | ||
|
|
There was a problem hiding this comment.
Note: These 2 tests in this class (ClusterBootstrapServiceTests) are moved to the new class ClusterBootstrapServiceDeprecatedMasterTests
Signed-off-by: Tianli Feng <ftianli@amazon.com>
|
I'm not sure if it's necessary to backport to |
| } | ||
|
|
||
| // 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.
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.
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.
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.
This assertion seems unnecessary for this test case - you can probably remove it
There was a problem hiding this comment.
👏 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.
…e-deprecation Signed-off-by: Tianli Feng <ftianli@amazon.com>
…ing() Signed-off-by: Tianli Feng <ftianli@amazon.com>
|
There is a test failure in log 4816: The assertion failed: I will resolve the issue in PR #3441 |
Description
Add some unit tests for validating the backwards compatibility of deprecated
masternode role andcluster.initial_master_nodessetting.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.