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

Set netty available processors system property for tests globally #75699

Merged

Conversation

mark-vieira
Copy link
Contributor

Set es.set.netty.runtime.available.processors system property globally in ESTestCase rather than configuring Gradle or JUnit test runners to add it. This makes for a more consistent test execution environment and alleviates issues with the IDE not being configured properly.

Closes #74737

@mark-vieira mark-vieira added >non-issue :Delivery/Build Build or test infrastructure v8.0.0 labels Jul 26, 2021
@mark-vieira mark-vieira requested a review from ywelsch July 26, 2021 18:23
@elasticmachine elasticmachine added the Team:Delivery Meta label for Delivery team label Jul 26, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for picking this up.

* We have to disable setting the number of available processors as tests in the same JVM randomize processors and will step on each
* other if we allow them to set the number of available processors as it's set-once in Netty.
*/
systemProperty 'es.set.netty.runtime.available.processors', 'false'
Copy link
Contributor

Choose a reason for hiding this comment

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

configuring this here probably didn't even make sense (as it's a YML test), right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct. I suspect it was just copy/pasted from elsewhere.

…cessors_sys_prop

# Conflicts:
#	x-pack/plugin/build.gradle
@mark-vieira mark-vieira merged commit 9d14bc9 into elastic:master Jul 27, 2021
@mark-vieira mark-vieira deleted the netty_available_processors_sys_prop branch July 27, 2021 18:21
mark-vieira added a commit to mark-vieira/elasticsearch that referenced this pull request Jul 27, 2021
elasticsearchmachine pushed a commit that referenced this pull request Jul 27, 2021
ywangd pushed a commit to ywangd/elasticsearch that referenced this pull request Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure >non-issue Team:Delivery Meta label for Delivery team v7.15.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure consistent use of system properties in tests run by Gradle as well IDEA
4 participants