-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Zen2: Move most integration tests to Zen2 #35678
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
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.
Nice. I left a few comments.
assertEquals(discoverySettings.getPublishTimeout(), DiscoverySettings.PUBLISH_TIMEOUT_SETTING.get(Settings.EMPTY)); | ||
assertTrue(DiscoverySettings.PUBLISH_DIFF_ENABLE_SETTING.get(Settings.EMPTY)); | ||
final Setting<Integer> INITIAL_RECOVERIES = CLUSTER_ROUTING_ALLOCATION_NODE_INITIAL_PRIMARIES_RECOVERIES_SETTING; | ||
final Setting<Integer> CONCURRENT_RECOVIERS = CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES_SETTING; |
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.
Typo: RECOVIERS
-> RECOVERIES
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.
fixed in 164dd3a
.put(DiscoverySettings.PUBLISH_DIFF_ENABLE_SETTING.getKey(), false) | ||
.put(DiscoverySettings.PUBLISH_TIMEOUT_SETTING.getKey(), "1s").build()) | ||
.put(INITIAL_RECOVERIES.getKey(), 7) | ||
.put(CONCURRENT_RECOVIERS.getKey(), 42).build()) |
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.
I think we should maintain the variety in the types a bit - we used to have a boolean and a time-value but now there's just integers.
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.
fixed in 7f590ea
@@ -192,6 +192,7 @@ public void testDelayedMappingPropagationOnPrimary() throws Exception { | |||
Settings settings = Settings.builder() | |||
.put(DiscoverySettings.COMMIT_TIMEOUT_SETTING.getKey(), "30s") // explicitly set so it won't default to publish timeout | |||
.put(DiscoverySettings.PUBLISH_TIMEOUT_SETTING.getKey(), "0s") // don't wait post commit as we are blocking things by design | |||
.put(TestZenDiscovery.USE_ZEN2.getKey(), false) // stops 1 node out of 2 |
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.
Stopping one node from two should be ok?
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.
the explanation was bad here, the node is not stopped, but partitioned away. The gist is that this tests needs bigger changes to work with Zen2. Nothing particularly wrong with Zen2, just that this test requires a very peculiar setup. I have not made my mind up yet how to refactor it, so I will keep this as TODO for now. I've pushed 36b5cde to change the comment.
@@ -306,6 +307,7 @@ public void testDelayedMappingPropagationOnReplica() throws Exception { | |||
Settings.builder() | |||
.put(DiscoverySettings.COMMIT_TIMEOUT_SETTING.getKey(), "30s") // explicitly set so it won't default to publish timeout | |||
.put(DiscoverySettings.PUBLISH_TIMEOUT_SETTING.getKey(), "0s") // don't wait post commit as we are blocking things by design | |||
.put(TestZenDiscovery.USE_ZEN2.getKey(), false) // stops 1 node out of 2 |
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.
Stopping one node from two should be ok?
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.
same as above
@@ -91,7 +91,7 @@ public void testThatConnectionToServerTypeConnectionWorks() throws IOException, | |||
Path xpackConf = home.resolve("config"); | |||
Files.createDirectories(xpackConf); | |||
|
|||
Transport transport = internalCluster().getDataNodeInstance(Transport.class); | |||
Transport transport = internalCluster().getMasterNodeInstance(Transport.class); |
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.
Do we intend this change in behaviour?
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.
yes, Zen2 requires for there to be a master-eligible node in the unicast hosts list in order to find and rejoin the existing cluster.
private static final class MasterNodePredicate implements Predicate<NodeAndClient> { | ||
private final String masterNodeName; | ||
private final Optional<String> masterNodeName; |
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.
I think I preferred the DataOrMasterNodePredicate
.
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.
I've pushed further on the refactoring (see aa37d57). Let me know if you like this 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.
LGTM
Zen2 is now feature-complete enough to run most
ESIntegTestCase
tests. The changes in this PR are as follows:ClusterSettingsIT
is adapted to not be Zen1 specific anymore (it was using Zen1 settings).