Skip to content

Conversation

@ywelsch
Copy link
Contributor

@ywelsch ywelsch commented Oct 8, 2018

Adds the infrastructure to run integration tests against Zen2.

@ywelsch ywelsch added >non-issue v7.0.0 :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. labels Oct 8, 2018
@ywelsch ywelsch requested a review from DaveCTurner October 8, 2018 23:24
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a question about the tests and a simplification request.


@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0,
transportClientRatio = 0, supportsDedicatedMasters = false)
public class DedicatedClusterCoordinatorIT extends ESIntegTestCase {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test cases added here are fine tests, but I'm wondering if we could instead use some existing test cases to cover the same things, foreshadowing the migration of all the tests to support Zen2.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed things as follows:

  • all single node test cases are now randomly run with Zen2 (2ef9a15)
  • picked 2 test classes (one for dedicated, one for shared) on which I've enabled Zen2 (33aa8e0) and removed the extra introduced test classes

}

public static boolean getUseZen2() {
return useZen2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this mechanism could just return false here and avoid introducing the field and (unused) setter yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed all this in 08f91df. We can reintroduce it later when needed

@ywelsch ywelsch requested a review from DaveCTurner October 13, 2018 11:26
Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I left a couple of points but we can resolve them later if needs be.

.put(EsExecutors.PROCESSORS_SETTING.getKey(), 1) // limit the number of threads created
.put("transport.type", getTestTransportType())
.put(Node.NODE_DATA_SETTING.getKey(), true)
.put(TestZenDiscovery.USE_ZEN2.getKey(), randomBoolean())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the other tests that are migrated to use Zen2 we set this to true (i.e. we are not testing the Zen1 case any more). I think that's what we want to do here too, but in any case we should be consistent about this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that we should be consistent about this. For now, I've switched this to always use Zen2 (see f9fb7df), but will revisit once we migrate more integration tests.

try {
node.start();
} catch (NodeValidationException e) {
throw new RuntimeException(e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this was here before, but why RuntimeException and not AssertionError here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use the same pattern in InternalTestCluster, and I think the better change would be to make NodeValidationException a non-checked exception (so that this wrapping is not needed).

@ywelsch ywelsch merged commit 5fbead0 into elastic:zen2 Oct 14, 2018
@ywelsch ywelsch mentioned this pull request Oct 19, 2018
61 tasks
@jimczi jimczi added v7.0.0-beta1 and removed v7.0.0 labels Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. >non-issue v7.0.0-beta1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants