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: Prevent usage of System Properties in the InternalTestCluster #6663

Merged
merged 1 commit into from Jul 1, 2014

Conversation

s1monw
Copy link
Contributor

@s1monw s1monw commented Jul 1, 2014

All settings should be passes as settings and the enviroment should not
influence the test cluster settings. The settings we care about ie.
es.node.mode and es.logger.level should be passed via settings.
This allows tests to override these settings if they for instance need
network transport to operate at all.

public static String nodeMode() {
Settings build = ImmutableSettings.builder()
.put("node.local", System.getProperty("es.node.local", "true")) // default to local
.put("es.node.mode", System.getProperty("es.node.local", "local")).build();
Copy link
Member

Choose a reason for hiding this comment

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

s/es.node.local/es.node.mode ?

Copy link
Member

Choose a reason for hiding this comment

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

Also I think you should take out the es prefix from the key that you use to put?

@javanna javanna removed the review label Jul 1, 2014
@javanna
Copy link
Member

javanna commented Jul 1, 2014

Left a few comments @s1monw ;)

@s1monw
Copy link
Contributor Author

s1monw commented Jul 1, 2014

@javanna I pushed a new commit

@s1monw s1monw added the review label Jul 1, 2014
@javanna
Copy link
Member

javanna commented Jul 1, 2014

LGTM

All settings should be passes as settings and the enviroment should not
influence the test cluster settings. The settings we care about ie.
`es.node.mode` and `es.logger.level` should be passed via settings.
This allows tests to override these settings if they for instance need
`network` transport to operate at all.

Closes elastic#6663
@spinscale
Copy link
Contributor

LGTM

@s1monw s1monw merged commit fd1d02f into elastic:master Jul 1, 2014
s1monw added a commit that referenced this pull request Jul 1, 2014
All settings should be passes as settings and the enviroment should not
influence the test cluster settings. The settings we care about ie.
`es.node.mode` and `es.logger.level` should be passed via settings.
This allows tests to override these settings if they for instance need
`network` transport to operate at all.

Closes #6663
@s1monw
Copy link
Contributor Author

s1monw commented Jul 1, 2014

just in time @spinscale

@s1monw s1monw deleted the no_system_properties branch July 1, 2014 16:12
@jpountz jpountz removed the review label Jul 16, 2014
@clintongormley clintongormley changed the title [TEST] Prevent usage of System Properties in the InternalTestCluster Test: Prevent usage of System Properties in the InternalTestCluster Jul 16, 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.3.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants