Skip to content
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: Allow global test cluster to have configurable settings source #7482

Conversation

spinscale
Copy link
Contributor

This allows to reuse the global test cluster with specific configurations,
which is useful in plugins.

Allows to change this in plugin tests like this:

public class FooTest extends ElasticsearchIntegrationTest {

    static {
        InternalTestCluster.DEFAULT_SETTINGS_SOURCE = new SettingsSource() { ... };
    }

    @Test
    public void foo() { ... }

@s1monw
Copy link
Contributor

s1monw commented Aug 27, 2014

awesome maybe we can drop that extra ctor in InternalTestCluster too then?

@@ -123,6 +123,8 @@

private final ESLogger logger = Loggers.getLogger(getClass());

public static SettingsSource CONFIGURABLE_SETTINGS_SOURCE = SettingsSource.EMPTY;
Copy link
Member

Choose a reason for hiding this comment

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

maybe package private instead of public?

@spinscale spinscale force-pushed the enhancement/allow-configurable-settingssource-for-global-testcluster branch 4 times, most recently from d707469 to a66df79 Compare August 27, 2014 13:33
@spinscale
Copy link
Contributor Author

@s1monw I removed the simple unused constructor and left the other two in place. The TribeTests are using it as well and doesnt make too much sense for them to set it explicety in the tests.. this way everything can stay package private

@javanna
Copy link
Member

javanna commented Aug 27, 2014

Left a minor comment, other that that looks great to me!

@nik9000
Copy link
Member

nik9000 commented Aug 27, 2014

Sweet! I'm looking forward to this!

@javanna
Copy link
Member

javanna commented Aug 27, 2014

Hey @nik9000 right this would help #7040 too wouldn't it?

@nik9000
Copy link
Member

nik9000 commented Aug 27, 2014

@javanna yeah! It pretty much closes that issue.

@s1monw
Copy link
Contributor

s1monw commented Aug 27, 2014

LGTM

This allows to reuse the global test cluster with specific configurations,
which is useful in plugins.
@spinscale spinscale force-pushed the enhancement/allow-configurable-settingssource-for-global-testcluster branch from a66df79 to 3aa72f2 Compare August 27, 2014 15:27
@spinscale spinscale merged commit 3aa72f2 into elastic:master Aug 27, 2014
@spinscale spinscale added v2.0.0 and removed review labels Aug 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>test Issues or PRs that are addressing/adding tests v1.4.0.Beta1 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants