From 718518fe85701d7ca5bc9bb77f5a85d24a4e2cd6 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Mon, 1 May 2017 19:27:45 -0400 Subject: [PATCH] Disable setting available processors in tests Within the same JVM, setting the number of processors available to Netty can only be done once. However, tests randomize the number of processors and so without intervention would attempt to set this value multiple times. Therefore, we need to use a flag that prevents setting this value in tests. Relates elastic/x-pack-elasticsearch#1266 Original commit: elastic/x-pack-elasticsearch@d1271497257050a02c8ff306b85a6cf73d495af5 --- plugin/build.gradle | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/plugin/build.gradle b/plugin/build.gradle index bad103c679d..6b9c08c823a 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -375,6 +375,22 @@ integTestCluster { } } +test { + /* + * 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' +} + +integTestRunner { + /* + * 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' +} + // TODO: don't publish test artifacts just to run messy tests, fix the tests! // https://github.com/elastic/x-plugins/issues/724 configurations {