diff --git a/modules/reindex/src/test/java/org/elasticsearch/index/reindex/ReindexFromRemoteWithAuthTests.java b/modules/reindex/src/test/java/org/elasticsearch/index/reindex/ReindexFromRemoteWithAuthTests.java index 940918de10dc6..72ba651dff9ae 100644 --- a/modules/reindex/src/test/java/org/elasticsearch/index/reindex/ReindexFromRemoteWithAuthTests.java +++ b/modules/reindex/src/test/java/org/elasticsearch/index/reindex/ReindexFromRemoteWithAuthTests.java @@ -19,7 +19,6 @@ package org.elasticsearch.index.reindex; -import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; import org.apache.lucene.util.SetOnce; import org.elasticsearch.ElasticsearchSecurityException; import org.elasticsearch.ElasticsearchStatusException; @@ -42,7 +41,6 @@ import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.env.Environment; import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.index.reindex.test.ObjectCleanerThreadThreadFilter; import org.elasticsearch.plugins.ActionPlugin; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.rest.RestStatus; @@ -66,7 +64,6 @@ import static org.elasticsearch.index.reindex.ReindexTestCase.matcher; import static org.hamcrest.Matchers.containsString; -@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class}) public class ReindexFromRemoteWithAuthTests extends ESSingleNodeTestCase { private TransportAddress address; diff --git a/modules/reindex/src/test/java/org/elasticsearch/index/reindex/RetryTests.java b/modules/reindex/src/test/java/org/elasticsearch/index/reindex/RetryTests.java index df00083587018..1107a36086927 100644 --- a/modules/reindex/src/test/java/org/elasticsearch/index/reindex/RetryTests.java +++ b/modules/reindex/src/test/java/org/elasticsearch/index/reindex/RetryTests.java @@ -19,7 +19,6 @@ package org.elasticsearch.index.reindex; -import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; import org.elasticsearch.action.ActionFuture; import org.elasticsearch.action.admin.cluster.node.info.NodeInfo; import org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse; @@ -33,7 +32,6 @@ import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException; import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.reindex.test.ObjectCleanerThreadThreadFilter; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.threadpool.ThreadPool; @@ -57,7 +55,6 @@ * Integration test for retry behavior. Useful because retrying relies on the way that the * rest of Elasticsearch throws exceptions and unit tests won't verify that. */ -@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class}) public class RetryTests extends ESIntegTestCase { private static final int DOC_COUNT = 20; diff --git a/modules/reindex/src/test/java/org/elasticsearch/index/reindex/test/ObjectCleanerThreadThreadFilter.java b/modules/reindex/src/test/java/org/elasticsearch/index/reindex/test/ObjectCleanerThreadThreadFilter.java deleted file mode 100644 index 948f1ec7fd6f6..0000000000000 --- a/modules/reindex/src/test/java/org/elasticsearch/index/reindex/test/ObjectCleanerThreadThreadFilter.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.elasticsearch.index.reindex.test; - -import com.carrotsearch.randomizedtesting.ThreadFilter; - -public class ObjectCleanerThreadThreadFilter implements ThreadFilter { - - @Override - public boolean reject(final Thread t) { - // TODO: replace with constant from Netty when https://github.com/netty/netty/pull/8014 is integrated - return "ObjectCleanerThread".equals(t.getName()); - } - -} diff --git a/modules/transport-netty4/build.gradle b/modules/transport-netty4/build.gradle index ed905a530c48e..5d4bcd7c10a84 100644 --- a/modules/transport-netty4/build.gradle +++ b/modules/transport-netty4/build.gradle @@ -34,13 +34,13 @@ compileTestJava.options.compilerArgs << "-Xlint:-cast,-deprecation,-rawtypes,-tr dependencies { // network stack - compile "io.netty:netty-buffer:4.1.25.Final" - compile "io.netty:netty-codec:4.1.25.Final" - compile "io.netty:netty-codec-http:4.1.25.Final" - compile "io.netty:netty-common:4.1.25.Final" - compile "io.netty:netty-handler:4.1.25.Final" - compile "io.netty:netty-resolver:4.1.25.Final" - compile "io.netty:netty-transport:4.1.25.Final" + compile "io.netty:netty-buffer:4.1.16.Final" + compile "io.netty:netty-codec:4.1.16.Final" + compile "io.netty:netty-codec-http:4.1.16.Final" + compile "io.netty:netty-common:4.1.16.Final" + compile "io.netty:netty-handler:4.1.16.Final" + compile "io.netty:netty-resolver:4.1.16.Final" + compile "io.netty:netty-transport:4.1.16.Final" } dependencyLicenses { @@ -161,6 +161,6 @@ thirdPartyAudit.excludes = [ 'org.conscrypt.AllocatedBuffer', 'org.conscrypt.BufferAllocator', - 'org.conscrypt.Conscrypt', + 'org.conscrypt.Conscrypt$Engines', 'org.conscrypt.HandshakeListener' ] diff --git a/modules/transport-netty4/licenses/netty-buffer-4.1.16.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-buffer-4.1.16.Final.jar.sha1 new file mode 100644 index 0000000000000..c546222971985 --- /dev/null +++ b/modules/transport-netty4/licenses/netty-buffer-4.1.16.Final.jar.sha1 @@ -0,0 +1 @@ +63b5fa95c74785e16f2c30ce268bc222e35c8cb5 \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-buffer-4.1.25.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-buffer-4.1.25.Final.jar.sha1 deleted file mode 100644 index 3ca0cbb45ec31..0000000000000 --- a/modules/transport-netty4/licenses/netty-buffer-4.1.25.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -f366d0cc87b158ca064d27507127e3cc4eb2f089 \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-codec-4.1.16.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-codec-4.1.16.Final.jar.sha1 new file mode 100644 index 0000000000000..1e6c241ea0b17 --- /dev/null +++ b/modules/transport-netty4/licenses/netty-codec-4.1.16.Final.jar.sha1 @@ -0,0 +1 @@ +d84a1f21768b7309c2954521cf5a1f46c2309eb1 \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-codec-4.1.25.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-codec-4.1.25.Final.jar.sha1 deleted file mode 100644 index 5e2bc85c548dd..0000000000000 --- a/modules/transport-netty4/licenses/netty-codec-4.1.25.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -3e465c75bead40d06b5b9c0612b37cf77c548887 \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-codec-http-4.1.16.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-codec-http-4.1.16.Final.jar.sha1 new file mode 100644 index 0000000000000..71c33af1c5fc2 --- /dev/null +++ b/modules/transport-netty4/licenses/netty-codec-http-4.1.16.Final.jar.sha1 @@ -0,0 +1 @@ +d64312378b438dfdad84267c599a053327c6f02a \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-codec-http-4.1.25.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-codec-http-4.1.25.Final.jar.sha1 deleted file mode 100644 index 58cb7fd987949..0000000000000 --- a/modules/transport-netty4/licenses/netty-codec-http-4.1.25.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -70888d3f2a829541378f68503ddd52c3193df35a \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-common-4.1.16.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-common-4.1.16.Final.jar.sha1 new file mode 100644 index 0000000000000..3edf5fcea59b3 --- /dev/null +++ b/modules/transport-netty4/licenses/netty-common-4.1.16.Final.jar.sha1 @@ -0,0 +1 @@ +177a6b30cca92f6f5f9873c9befd681377a4c328 \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-common-4.1.25.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-common-4.1.25.Final.jar.sha1 deleted file mode 100644 index 62f85f8965513..0000000000000 --- a/modules/transport-netty4/licenses/netty-common-4.1.25.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -e17d5c05c101fe14536ce3fb34b36c54e04791f6 \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-handler-4.1.16.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-handler-4.1.16.Final.jar.sha1 new file mode 100644 index 0000000000000..cba27387268d1 --- /dev/null +++ b/modules/transport-netty4/licenses/netty-handler-4.1.16.Final.jar.sha1 @@ -0,0 +1 @@ +fec0e63e7dd7f4eeef7ea8dc47a1ff32dfc7ebc2 \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-handler-4.1.25.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-handler-4.1.25.Final.jar.sha1 deleted file mode 100644 index 5391f625a4df0..0000000000000 --- a/modules/transport-netty4/licenses/netty-handler-4.1.25.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -ecdfb8fe93a8b75db3ea8746d3437eed845c24bd \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-resolver-4.1.16.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-resolver-4.1.16.Final.jar.sha1 new file mode 100644 index 0000000000000..3571d2ecfdc48 --- /dev/null +++ b/modules/transport-netty4/licenses/netty-resolver-4.1.16.Final.jar.sha1 @@ -0,0 +1 @@ +f6eb553b53fb3a90a8ac1170697093fed82eae28 \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-resolver-4.1.25.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-resolver-4.1.25.Final.jar.sha1 deleted file mode 100644 index 8225fb799e3ff..0000000000000 --- a/modules/transport-netty4/licenses/netty-resolver-4.1.25.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -dc0965d00746b782b33f419b005cbc130973030d \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-transport-4.1.16.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-transport-4.1.16.Final.jar.sha1 new file mode 100644 index 0000000000000..e502d4c77084c --- /dev/null +++ b/modules/transport-netty4/licenses/netty-transport-4.1.16.Final.jar.sha1 @@ -0,0 +1 @@ +3c8ee2c4d4a1cbb947a5c184c7aeb2204260958b \ No newline at end of file diff --git a/modules/transport-netty4/licenses/netty-transport-4.1.25.Final.jar.sha1 b/modules/transport-netty4/licenses/netty-transport-4.1.25.Final.jar.sha1 deleted file mode 100644 index 1049ea4b98bc6..0000000000000 --- a/modules/transport-netty4/licenses/netty-transport-4.1.25.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -19a6f1f649894b6705aa9d8cbcced188dff133b0 \ No newline at end of file diff --git a/modules/transport-netty4/src/main/plugin-metadata/plugin-security.policy b/modules/transport-netty4/src/main/plugin-metadata/plugin-security.policy index 3775931efb150..32b2dc9bd1540 100644 --- a/modules/transport-netty4/src/main/plugin-metadata/plugin-security.policy +++ b/modules/transport-netty4/src/main/plugin-metadata/plugin-security.policy @@ -21,8 +21,6 @@ grant codeBase "${codebase.netty-common}" { // for reading the system-wide configuration for the backlog of established sockets permission java.io.FilePermission "/proc/sys/net/core/somaxconn", "read"; - permission java.lang.RuntimePermission "setContextClassLoader"; - // netty makes and accepts socket connections permission java.net.SocketPermission "*", "accept,connect"; }; diff --git a/modules/transport-netty4/src/test/java/org/elasticsearch/test/Netty4IntegTestCase.java b/modules/transport-netty4/src/test/java/org/elasticsearch/ESNetty4IntegTestCase.java similarity index 90% rename from modules/transport-netty4/src/test/java/org/elasticsearch/test/Netty4IntegTestCase.java rename to modules/transport-netty4/src/test/java/org/elasticsearch/ESNetty4IntegTestCase.java index c21b863d196b7..b38cda76c6980 100644 --- a/modules/transport-netty4/src/test/java/org/elasticsearch/test/Netty4IntegTestCase.java +++ b/modules/transport-netty4/src/test/java/org/elasticsearch/ESNetty4IntegTestCase.java @@ -16,21 +16,19 @@ * specific language governing permissions and limitations * under the License. */ +package org.elasticsearch; -package org.elasticsearch.test; - -import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; import org.elasticsearch.common.network.NetworkModule; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.plugins.Plugin; +import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.transport.Netty4Plugin; import org.elasticsearch.transport.netty4.Netty4Transport; import java.util.Arrays; import java.util.Collection; -@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class}) -public abstract class Netty4IntegTestCase extends ESIntegTestCase { +public abstract class ESNetty4IntegTestCase extends ESIntegTestCase { @Override protected boolean ignoreExternalCluster() { diff --git a/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4BadRequestTests.java b/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4BadRequestTests.java index 8baf818975ed8..094f339059876 100644 --- a/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4BadRequestTests.java +++ b/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4BadRequestTests.java @@ -20,7 +20,6 @@ package org.elasticsearch.http.netty4; import io.netty.handler.codec.http.FullHttpResponse; -import org.elasticsearch.test.Netty4TestCase; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.network.NetworkService; import org.elasticsearch.common.settings.Settings; @@ -34,6 +33,7 @@ import org.elasticsearch.rest.RestChannel; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.RestStatus; +import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; import org.junit.After; @@ -48,7 +48,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; -public class Netty4BadRequestTests extends Netty4TestCase { +public class Netty4BadRequestTests extends ESTestCase { private NetworkService networkService; private MockBigArrays bigArrays; diff --git a/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpChannelTests.java b/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpChannelTests.java index f7f04cfa540f6..7c5b35a322996 100644 --- a/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpChannelTests.java +++ b/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpChannelTests.java @@ -41,7 +41,6 @@ import io.netty.handler.codec.http.HttpVersion; import io.netty.util.Attribute; import io.netty.util.AttributeKey; -import org.elasticsearch.test.Netty4TestCase; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.bytes.ReleasablePagedBytesReference; import org.elasticsearch.common.io.stream.BytesStreamOutput; @@ -65,6 +64,7 @@ import org.elasticsearch.rest.BytesRestResponse; import org.elasticsearch.rest.RestResponse; import org.elasticsearch.rest.RestStatus; +import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.netty4.Netty4Utils; @@ -90,7 +90,7 @@ import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -public class Netty4HttpChannelTests extends Netty4TestCase { +public class Netty4HttpChannelTests extends ESTestCase { private NetworkService networkService; private ThreadPool threadPool; diff --git a/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpPipeliningHandlerTests.java b/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpPipeliningHandlerTests.java index 606b050f4e393..21151304424c1 100644 --- a/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpPipeliningHandlerTests.java +++ b/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpPipeliningHandlerTests.java @@ -36,9 +36,9 @@ import io.netty.handler.codec.http.HttpVersion; import io.netty.handler.codec.http.LastHttpContent; import io.netty.handler.codec.http.QueryStringDecoder; -import org.elasticsearch.test.Netty4TestCase; import org.elasticsearch.common.Randomness; import org.elasticsearch.http.HttpPipelinedRequest; +import org.elasticsearch.test.ESTestCase; import org.junit.After; import java.nio.channels.ClosedChannelException; @@ -61,7 +61,7 @@ import static io.netty.handler.codec.http.HttpVersion.HTTP_1_1; import static org.hamcrest.core.Is.is; -public class Netty4HttpPipeliningHandlerTests extends Netty4TestCase { +public class Netty4HttpPipeliningHandlerTests extends ESTestCase { private final ExecutorService handlerService = Executors.newFixedThreadPool(randomIntBetween(4, 8)); private final ExecutorService eventLoopService = Executors.newFixedThreadPool(1); diff --git a/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpRequestSizeLimitIT.java b/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpRequestSizeLimitIT.java index ec3dbbf3846f0..269773fbb634c 100644 --- a/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpRequestSizeLimitIT.java +++ b/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpRequestSizeLimitIT.java @@ -20,7 +20,7 @@ package org.elasticsearch.http.netty4; import io.netty.handler.codec.http.FullHttpResponse; -import org.elasticsearch.test.Netty4IntegTestCase; +import org.elasticsearch.ESNetty4IntegTestCase; import org.elasticsearch.common.collect.Tuple; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.TransportAddress; @@ -45,7 +45,7 @@ * a single node "cluster". We also force test infrastructure to use the node client instead of the transport client for the same reason. */ @ClusterScope(scope = Scope.TEST, supportsDedicatedMasters = false, numClientNodes = 0, numDataNodes = 1, transportClientRatio = 0) -public class Netty4HttpRequestSizeLimitIT extends Netty4IntegTestCase { +public class Netty4HttpRequestSizeLimitIT extends ESNetty4IntegTestCase { private static final ByteSizeValue LIMIT = new ByteSizeValue(2, ByteSizeUnit.KB); diff --git a/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpServerPipeliningTests.java b/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpServerPipeliningTests.java index 68b51f8acc13f..f2b28b909187b 100644 --- a/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpServerPipeliningTests.java +++ b/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpServerPipeliningTests.java @@ -32,7 +32,6 @@ import io.netty.handler.codec.http.HttpHeaderNames; import io.netty.handler.codec.http.HttpResponseStatus; import io.netty.handler.codec.http.HttpVersion; -import org.elasticsearch.test.Netty4TestCase; import org.elasticsearch.common.network.NetworkService; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.TransportAddress; @@ -43,6 +42,7 @@ import org.elasticsearch.http.HttpServerTransport; import org.elasticsearch.http.NullDispatcher; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; +import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; import org.junit.After; @@ -61,7 +61,7 @@ /** * This test just tests, if he pipelining works in general with out any connection the Elasticsearch handler */ -public class Netty4HttpServerPipeliningTests extends Netty4TestCase { +public class Netty4HttpServerPipeliningTests extends ESTestCase { private NetworkService networkService; private ThreadPool threadPool; private MockBigArrays bigArrays; diff --git a/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpServerTransportTests.java b/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpServerTransportTests.java index 1df18459a0352..5b22409b92da0 100644 --- a/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpServerTransportTests.java +++ b/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4HttpServerTransportTests.java @@ -38,7 +38,6 @@ import io.netty.handler.codec.http.HttpResponseStatus; import io.netty.handler.codec.http.HttpUtil; import io.netty.handler.codec.http.HttpVersion; -import org.elasticsearch.test.Netty4TestCase; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.Strings; import org.elasticsearch.common.bytes.BytesArray; @@ -60,6 +59,7 @@ import org.elasticsearch.rest.BytesRestResponse; import org.elasticsearch.rest.RestChannel; import org.elasticsearch.rest.RestRequest; +import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; import org.junit.After; @@ -94,7 +94,7 @@ /** * Tests for the {@link Netty4HttpServerTransport} class. */ -public class Netty4HttpServerTransportTests extends Netty4TestCase { +public class Netty4HttpServerTransportTests extends ESTestCase { private NetworkService networkService; private ThreadPool threadPool; diff --git a/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4PipeliningIT.java b/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4PipeliningIT.java index c90992a69d0b3..ebb91d9663ed5 100644 --- a/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4PipeliningIT.java +++ b/modules/transport-netty4/src/test/java/org/elasticsearch/http/netty4/Netty4PipeliningIT.java @@ -20,7 +20,7 @@ package org.elasticsearch.http.netty4; import io.netty.handler.codec.http.FullHttpResponse; -import org.elasticsearch.test.Netty4IntegTestCase; +import org.elasticsearch.ESNetty4IntegTestCase; import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.http.HttpServerTransport; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; @@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.is; @ClusterScope(scope = Scope.TEST, supportsDedicatedMasters = false, numDataNodes = 1) -public class Netty4PipeliningIT extends Netty4IntegTestCase { +public class Netty4PipeliningIT extends ESNetty4IntegTestCase { @Override protected boolean addMockHttpTransport() { diff --git a/modules/transport-netty4/src/test/java/org/elasticsearch/test/Netty4TestCase.java b/modules/transport-netty4/src/test/java/org/elasticsearch/test/Netty4TestCase.java deleted file mode 100644 index df931d61992ef..0000000000000 --- a/modules/transport-netty4/src/test/java/org/elasticsearch/test/Netty4TestCase.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.elasticsearch.test; - -import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; - -@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class}) -public abstract class Netty4TestCase extends ESTestCase { -} diff --git a/modules/transport-netty4/src/test/java/org/elasticsearch/test/ObjectCleanerThreadThreadFilter.java b/modules/transport-netty4/src/test/java/org/elasticsearch/test/ObjectCleanerThreadThreadFilter.java deleted file mode 100644 index e47c536665d13..0000000000000 --- a/modules/transport-netty4/src/test/java/org/elasticsearch/test/ObjectCleanerThreadThreadFilter.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.elasticsearch.test; - -import com.carrotsearch.randomizedtesting.ThreadFilter; - -/** - * The Netty object cleaner thread is not closeable and it does not terminate in a timely manner. This means that thread leak control in - * tests will fail test suites when the object cleaner thread has not terminated. Since there is not a reliable way to terminate this thread - * we instead filter it out of thread leak control. - */ -public class ObjectCleanerThreadThreadFilter implements ThreadFilter { - - @Override - public boolean reject(final Thread t) { - // TODO: replace with constant from Netty when https://github.com/netty/netty/pull/8014 is integrated - return "ObjectCleanerThread".equals(t.getName()); - } - -} - diff --git a/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/ByteBufBytesReferenceTests.java b/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/ByteBufBytesReferenceTests.java index 618d3ffe8f96a..4a41aaec952a0 100644 --- a/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/ByteBufBytesReferenceTests.java +++ b/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/ByteBufBytesReferenceTests.java @@ -18,18 +18,15 @@ */ package org.elasticsearch.transport.netty4; -import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import org.apache.lucene.util.BytesRef; -import org.elasticsearch.test.ObjectCleanerThreadThreadFilter; import org.elasticsearch.common.bytes.AbstractBytesReferenceTestCase; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.ReleasableBytesStreamOutput; import java.io.IOException; -@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class}) public class ByteBufBytesReferenceTests extends AbstractBytesReferenceTestCase { @Override diff --git a/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/ESLoggingHandlerIT.java b/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/ESLoggingHandlerIT.java index 8ef8b28dc1497..acd71749e2333 100644 --- a/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/ESLoggingHandlerIT.java +++ b/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/ESLoggingHandlerIT.java @@ -20,7 +20,7 @@ package org.elasticsearch.transport.netty4; import org.apache.logging.log4j.Level; -import org.elasticsearch.test.Netty4IntegTestCase; +import org.elasticsearch.ESNetty4IntegTestCase; import org.elasticsearch.action.admin.cluster.node.hotthreads.NodesHotThreadsRequest; import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.test.ESIntegTestCase; @@ -29,7 +29,7 @@ @ESIntegTestCase.ClusterScope(numDataNodes = 2) @TestLogging(value = "org.elasticsearch.transport.netty4.ESLoggingHandler:trace") -public class ESLoggingHandlerIT extends Netty4IntegTestCase { +public class ESLoggingHandlerIT extends ESNetty4IntegTestCase { private MockLogAppender appender; diff --git a/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/Netty4ScheduledPingTests.java b/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/Netty4ScheduledPingTests.java index b4b33ba96211c..b967a7ea41069 100644 --- a/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/Netty4ScheduledPingTests.java +++ b/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/Netty4ScheduledPingTests.java @@ -18,7 +18,6 @@ */ package org.elasticsearch.transport.netty4; -import org.elasticsearch.test.Netty4TestCase; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.common.io.stream.NamedWriteableRegistry; import org.elasticsearch.common.lease.Releasables; @@ -27,6 +26,7 @@ import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.indices.breaker.CircuitBreakerService; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; +import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.transport.MockTransportService; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; @@ -47,7 +47,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; -public class Netty4ScheduledPingTests extends Netty4TestCase { +public class Netty4ScheduledPingTests extends ESTestCase { public void testScheduledPing() throws Exception { ThreadPool threadPool = new TestThreadPool(getClass().getName()); diff --git a/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/Netty4SizeHeaderFrameDecoderTests.java b/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/Netty4SizeHeaderFrameDecoderTests.java index 0819548907296..7343da6c3b11a 100644 --- a/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/Netty4SizeHeaderFrameDecoderTests.java +++ b/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/Netty4SizeHeaderFrameDecoderTests.java @@ -19,7 +19,6 @@ package org.elasticsearch.transport.netty4; -import org.elasticsearch.test.Netty4TestCase; import org.elasticsearch.common.io.stream.NamedWriteableRegistry; import org.elasticsearch.common.network.NetworkService; import org.elasticsearch.common.settings.Settings; @@ -29,6 +28,7 @@ import org.elasticsearch.common.util.MockPageCacheRecycler; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; import org.elasticsearch.mocksocket.MockSocket; +import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TcpTransport; import org.junit.After; @@ -47,7 +47,7 @@ * This test checks, if a HTTP look-alike request (starting with a HTTP method and a space) * actually returns text response instead of just dropping the connection */ -public class Netty4SizeHeaderFrameDecoderTests extends Netty4TestCase { +public class Netty4SizeHeaderFrameDecoderTests extends ESTestCase { private final Settings settings = Settings.builder() .put("node.name", "NettySizeHeaderFrameDecoderTests") diff --git a/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/Netty4TransportIT.java b/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/Netty4TransportIT.java index a426c11db8245..b81c8efcb47ee 100644 --- a/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/Netty4TransportIT.java +++ b/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/Netty4TransportIT.java @@ -18,7 +18,7 @@ */ package org.elasticsearch.transport.netty4; -import org.elasticsearch.test.Netty4IntegTestCase; +import org.elasticsearch.ESNetty4IntegTestCase; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.Version; import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; @@ -54,7 +54,7 @@ import static org.hamcrest.Matchers.is; @ClusterScope(scope = Scope.TEST, supportsDedicatedMasters = false, numDataNodes = 1) -public class Netty4TransportIT extends Netty4IntegTestCase { +public class Netty4TransportIT extends ESNetty4IntegTestCase { // static so we can use it in anonymous classes private static String channelProfileName = null; diff --git a/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/Netty4TransportMultiPortIntegrationIT.java b/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/Netty4TransportMultiPortIntegrationIT.java index ddef8abcf0181..52ad32efb5645 100644 --- a/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/Netty4TransportMultiPortIntegrationIT.java +++ b/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/Netty4TransportMultiPortIntegrationIT.java @@ -18,7 +18,7 @@ */ package org.elasticsearch.transport.netty4; -import org.elasticsearch.test.Netty4IntegTestCase; +import org.elasticsearch.ESNetty4IntegTestCase; import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; import org.elasticsearch.action.admin.cluster.node.info.NodeInfo; import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse; @@ -48,7 +48,7 @@ import static org.hamcrest.Matchers.lessThanOrEqualTo; @ClusterScope(scope = Scope.SUITE, supportsDedicatedMasters = false, numDataNodes = 1, numClientNodes = 0) -public class Netty4TransportMultiPortIntegrationIT extends Netty4IntegTestCase { +public class Netty4TransportMultiPortIntegrationIT extends ESNetty4IntegTestCase { private static int randomPort = -1; private static String randomPortRange; diff --git a/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/Netty4TransportPublishAddressIT.java b/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/Netty4TransportPublishAddressIT.java index dee104a73f7d7..922031d3c3dea 100644 --- a/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/Netty4TransportPublishAddressIT.java +++ b/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/Netty4TransportPublishAddressIT.java @@ -19,7 +19,7 @@ package org.elasticsearch.transport.netty4; -import org.elasticsearch.test.Netty4IntegTestCase; +import org.elasticsearch.ESNetty4IntegTestCase; import org.elasticsearch.action.admin.cluster.node.info.NodeInfo; import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse; import org.elasticsearch.common.network.NetworkModule; @@ -41,7 +41,7 @@ * different ports on ipv4 and ipv6. */ @ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) -public class Netty4TransportPublishAddressIT extends Netty4IntegTestCase { +public class Netty4TransportPublishAddressIT extends ESNetty4IntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { return Settings.builder() diff --git a/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/NettyTransportMultiPortTests.java b/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/NettyTransportMultiPortTests.java index 05d6d55ac42da..a49df3caaba4e 100644 --- a/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/NettyTransportMultiPortTests.java +++ b/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/NettyTransportMultiPortTests.java @@ -18,7 +18,6 @@ */ package org.elasticsearch.transport.netty4; -import org.elasticsearch.test.Netty4TestCase; import org.elasticsearch.common.component.Lifecycle; import org.elasticsearch.common.io.stream.NamedWriteableRegistry; import org.elasticsearch.common.network.NetworkService; @@ -28,6 +27,7 @@ import org.elasticsearch.common.util.MockBigArrays; import org.elasticsearch.common.util.MockPageCacheRecycler; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; +import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TcpTransport; @@ -37,7 +37,7 @@ import static org.hamcrest.Matchers.is; -public class NettyTransportMultiPortTests extends Netty4TestCase { +public class NettyTransportMultiPortTests extends ESTestCase { private String host; diff --git a/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/SimpleNetty4TransportTests.java b/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/SimpleNetty4TransportTests.java index 278b00965c9a5..efa296b6278af 100644 --- a/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/SimpleNetty4TransportTests.java +++ b/modules/transport-netty4/src/test/java/org/elasticsearch/transport/netty4/SimpleNetty4TransportTests.java @@ -19,8 +19,6 @@ package org.elasticsearch.transport.netty4; -import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; -import org.elasticsearch.test.ObjectCleanerThreadThreadFilter; import org.elasticsearch.Version; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.common.io.stream.NamedWriteableRegistry; @@ -51,7 +49,6 @@ import static java.util.Collections.emptySet; import static org.hamcrest.Matchers.containsString; -@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class}) public class SimpleNetty4TransportTests extends AbstractSimpleTransportTestCase { public static MockTransportService nettyFromThreadPool(Settings settings, ThreadPool threadPool, final Version version, diff --git a/plugins/transport-nio/build.gradle b/plugins/transport-nio/build.gradle index e76008ae28400..856a8552b8e5a 100644 --- a/plugins/transport-nio/build.gradle +++ b/plugins/transport-nio/build.gradle @@ -29,13 +29,13 @@ dependencies { compile "org.elasticsearch:elasticsearch-nio:${version}" // network stack - compile "io.netty:netty-buffer:4.1.25.Final" - compile "io.netty:netty-codec:4.1.25.Final" - compile "io.netty:netty-codec-http:4.1.25.Final" - compile "io.netty:netty-common:4.1.25.Final" - compile "io.netty:netty-handler:4.1.25.Final" - compile "io.netty:netty-resolver:4.1.25.Final" - compile "io.netty:netty-transport:4.1.25.Final" + compile "io.netty:netty-buffer:4.1.16.Final" + compile "io.netty:netty-codec:4.1.16.Final" + compile "io.netty:netty-codec-http:4.1.16.Final" + compile "io.netty:netty-common:4.1.16.Final" + compile "io.netty:netty-handler:4.1.16.Final" + compile "io.netty:netty-resolver:4.1.16.Final" + compile "io.netty:netty-transport:4.1.16.Final" } dependencyLicenses { @@ -140,6 +140,6 @@ thirdPartyAudit.excludes = [ 'org.conscrypt.AllocatedBuffer', 'org.conscrypt.BufferAllocator', - 'org.conscrypt.Conscrypt', + 'org.conscrypt.Conscrypt$Engines', 'org.conscrypt.HandshakeListener' ] \ No newline at end of file diff --git a/plugins/transport-nio/licenses/netty-buffer-4.1.16.Final.jar.sha1 b/plugins/transport-nio/licenses/netty-buffer-4.1.16.Final.jar.sha1 new file mode 100644 index 0000000000000..c546222971985 --- /dev/null +++ b/plugins/transport-nio/licenses/netty-buffer-4.1.16.Final.jar.sha1 @@ -0,0 +1 @@ +63b5fa95c74785e16f2c30ce268bc222e35c8cb5 \ No newline at end of file diff --git a/plugins/transport-nio/licenses/netty-buffer-4.1.25.Final.jar.sha1 b/plugins/transport-nio/licenses/netty-buffer-4.1.25.Final.jar.sha1 deleted file mode 100644 index 3ca0cbb45ec31..0000000000000 --- a/plugins/transport-nio/licenses/netty-buffer-4.1.25.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -f366d0cc87b158ca064d27507127e3cc4eb2f089 \ No newline at end of file diff --git a/plugins/transport-nio/licenses/netty-codec-4.1.16.Final.jar.sha1 b/plugins/transport-nio/licenses/netty-codec-4.1.16.Final.jar.sha1 new file mode 100644 index 0000000000000..1e6c241ea0b17 --- /dev/null +++ b/plugins/transport-nio/licenses/netty-codec-4.1.16.Final.jar.sha1 @@ -0,0 +1 @@ +d84a1f21768b7309c2954521cf5a1f46c2309eb1 \ No newline at end of file diff --git a/plugins/transport-nio/licenses/netty-codec-4.1.25.Final.jar.sha1 b/plugins/transport-nio/licenses/netty-codec-4.1.25.Final.jar.sha1 deleted file mode 100644 index 5e2bc85c548dd..0000000000000 --- a/plugins/transport-nio/licenses/netty-codec-4.1.25.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -3e465c75bead40d06b5b9c0612b37cf77c548887 \ No newline at end of file diff --git a/plugins/transport-nio/licenses/netty-codec-http-4.1.16.Final.jar.sha1 b/plugins/transport-nio/licenses/netty-codec-http-4.1.16.Final.jar.sha1 new file mode 100644 index 0000000000000..71c33af1c5fc2 --- /dev/null +++ b/plugins/transport-nio/licenses/netty-codec-http-4.1.16.Final.jar.sha1 @@ -0,0 +1 @@ +d64312378b438dfdad84267c599a053327c6f02a \ No newline at end of file diff --git a/plugins/transport-nio/licenses/netty-codec-http-4.1.25.Final.jar.sha1 b/plugins/transport-nio/licenses/netty-codec-http-4.1.25.Final.jar.sha1 deleted file mode 100644 index 58cb7fd987949..0000000000000 --- a/plugins/transport-nio/licenses/netty-codec-http-4.1.25.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -70888d3f2a829541378f68503ddd52c3193df35a \ No newline at end of file diff --git a/plugins/transport-nio/licenses/netty-common-4.1.16.Final.jar.sha1 b/plugins/transport-nio/licenses/netty-common-4.1.16.Final.jar.sha1 new file mode 100644 index 0000000000000..3edf5fcea59b3 --- /dev/null +++ b/plugins/transport-nio/licenses/netty-common-4.1.16.Final.jar.sha1 @@ -0,0 +1 @@ +177a6b30cca92f6f5f9873c9befd681377a4c328 \ No newline at end of file diff --git a/plugins/transport-nio/licenses/netty-common-4.1.25.Final.jar.sha1 b/plugins/transport-nio/licenses/netty-common-4.1.25.Final.jar.sha1 deleted file mode 100644 index 62f85f8965513..0000000000000 --- a/plugins/transport-nio/licenses/netty-common-4.1.25.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -e17d5c05c101fe14536ce3fb34b36c54e04791f6 \ No newline at end of file diff --git a/plugins/transport-nio/licenses/netty-handler-4.1.16.Final.jar.sha1 b/plugins/transport-nio/licenses/netty-handler-4.1.16.Final.jar.sha1 new file mode 100644 index 0000000000000..cba27387268d1 --- /dev/null +++ b/plugins/transport-nio/licenses/netty-handler-4.1.16.Final.jar.sha1 @@ -0,0 +1 @@ +fec0e63e7dd7f4eeef7ea8dc47a1ff32dfc7ebc2 \ No newline at end of file diff --git a/plugins/transport-nio/licenses/netty-handler-4.1.25.Final.jar.sha1 b/plugins/transport-nio/licenses/netty-handler-4.1.25.Final.jar.sha1 deleted file mode 100644 index 5391f625a4df0..0000000000000 --- a/plugins/transport-nio/licenses/netty-handler-4.1.25.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -ecdfb8fe93a8b75db3ea8746d3437eed845c24bd \ No newline at end of file diff --git a/plugins/transport-nio/licenses/netty-resolver-4.1.16.Final.jar.sha1 b/plugins/transport-nio/licenses/netty-resolver-4.1.16.Final.jar.sha1 new file mode 100644 index 0000000000000..3571d2ecfdc48 --- /dev/null +++ b/plugins/transport-nio/licenses/netty-resolver-4.1.16.Final.jar.sha1 @@ -0,0 +1 @@ +f6eb553b53fb3a90a8ac1170697093fed82eae28 \ No newline at end of file diff --git a/plugins/transport-nio/licenses/netty-resolver-4.1.25.Final.jar.sha1 b/plugins/transport-nio/licenses/netty-resolver-4.1.25.Final.jar.sha1 deleted file mode 100644 index 8225fb799e3ff..0000000000000 --- a/plugins/transport-nio/licenses/netty-resolver-4.1.25.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -dc0965d00746b782b33f419b005cbc130973030d \ No newline at end of file diff --git a/plugins/transport-nio/licenses/netty-transport-4.1.16.Final.jar.sha1 b/plugins/transport-nio/licenses/netty-transport-4.1.16.Final.jar.sha1 new file mode 100644 index 0000000000000..e502d4c77084c --- /dev/null +++ b/plugins/transport-nio/licenses/netty-transport-4.1.16.Final.jar.sha1 @@ -0,0 +1 @@ +3c8ee2c4d4a1cbb947a5c184c7aeb2204260958b \ No newline at end of file diff --git a/plugins/transport-nio/licenses/netty-transport-4.1.25.Final.jar.sha1 b/plugins/transport-nio/licenses/netty-transport-4.1.25.Final.jar.sha1 deleted file mode 100644 index 1049ea4b98bc6..0000000000000 --- a/plugins/transport-nio/licenses/netty-transport-4.1.25.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -19a6f1f649894b6705aa9d8cbcced188dff133b0 \ No newline at end of file diff --git a/plugins/transport-nio/src/main/plugin-metadata/plugin-security.policy b/plugins/transport-nio/src/main/plugin-metadata/plugin-security.policy index dcd193a779b09..8c8fe7c327412 100644 --- a/plugins/transport-nio/src/main/plugin-metadata/plugin-security.policy +++ b/plugins/transport-nio/src/main/plugin-metadata/plugin-security.policy @@ -23,8 +23,6 @@ grant codeBase "${codebase.elasticsearch-nio}" { }; grant codeBase "${codebase.netty-common}" { - permission java.lang.RuntimePermission "setContextClassLoader"; - // This should only currently be required as we use the netty http client for tests // netty makes and accepts socket connections permission java.net.SocketPermission "*", "accept,connect"; diff --git a/plugins/transport-nio/src/test/java/org/elasticsearch/test/NioIntegTestCase.java b/plugins/transport-nio/src/test/java/org/elasticsearch/NioIntegTestCase.java similarity index 97% rename from plugins/transport-nio/src/test/java/org/elasticsearch/test/NioIntegTestCase.java rename to plugins/transport-nio/src/test/java/org/elasticsearch/NioIntegTestCase.java index fb0ea8d9caa9f..703f7acbf8257 100644 --- a/plugins/transport-nio/src/test/java/org/elasticsearch/test/NioIntegTestCase.java +++ b/plugins/transport-nio/src/test/java/org/elasticsearch/NioIntegTestCase.java @@ -16,12 +16,13 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.test; +package org.elasticsearch; import org.elasticsearch.common.network.NetworkModule; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.http.nio.NioHttpServerTransport; import org.elasticsearch.plugins.Plugin; +import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.transport.nio.NioTransport; import org.elasticsearch.transport.nio.NioTransportPlugin; diff --git a/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/HttpReadWriteHandlerTests.java b/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/HttpReadWriteHandlerTests.java index f045de3d566a4..6ad53521ee12a 100644 --- a/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/HttpReadWriteHandlerTests.java +++ b/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/HttpReadWriteHandlerTests.java @@ -46,7 +46,7 @@ import org.elasticsearch.nio.SocketChannelContext; import org.elasticsearch.rest.RestChannel; import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.test.NioHttpTestCase; +import org.elasticsearch.test.ESTestCase; import org.junit.Before; import org.mockito.ArgumentCaptor; @@ -69,7 +69,7 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -public class HttpReadWriteHandlerTests extends NioHttpTestCase { +public class HttpReadWriteHandlerTests extends ESTestCase { private HttpReadWriteHandler handler; private NioSocketChannel nioSocketChannel; diff --git a/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NettyAdaptorTests.java b/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NettyAdaptorTests.java index 5900af7f98bd0..d6944a5f510e2 100644 --- a/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NettyAdaptorTests.java +++ b/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NettyAdaptorTests.java @@ -27,14 +27,14 @@ import io.netty.channel.ChannelPromise; import io.netty.channel.SimpleChannelInboundHandler; import org.elasticsearch.nio.FlushOperation; -import org.elasticsearch.test.NioHttpTestCase; +import org.elasticsearch.test.ESTestCase; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.util.Locale; import java.util.concurrent.atomic.AtomicBoolean; -public class NettyAdaptorTests extends NioHttpTestCase { +public class NettyAdaptorTests extends ESTestCase { public void testBasicRead() { TenIntsToStringsHandler handler = new TenIntsToStringsHandler(); diff --git a/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NioHttpPipeliningHandlerTests.java b/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NioHttpPipeliningHandlerTests.java index b156ef027c086..d12c608aeca2a 100644 --- a/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NioHttpPipeliningHandlerTests.java +++ b/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NioHttpPipeliningHandlerTests.java @@ -38,7 +38,7 @@ import io.netty.handler.codec.http.QueryStringDecoder; import org.elasticsearch.common.Randomness; import org.elasticsearch.http.HttpPipelinedRequest; -import org.elasticsearch.test.NioHttpTestCase; +import org.elasticsearch.test.ESTestCase; import org.junit.After; import java.nio.channels.ClosedChannelException; @@ -61,7 +61,7 @@ import static io.netty.handler.codec.http.HttpVersion.HTTP_1_1; import static org.hamcrest.core.Is.is; -public class NioHttpPipeliningHandlerTests extends NioHttpTestCase { +public class NioHttpPipeliningHandlerTests extends ESTestCase { private final ExecutorService handlerService = Executors.newFixedThreadPool(randomIntBetween(4, 8)); private final ExecutorService eventLoopService = Executors.newFixedThreadPool(1); diff --git a/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NioHttpServerTransportTests.java b/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NioHttpServerTransportTests.java index 421e235baaea0..c43fc7d072360 100644 --- a/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NioHttpServerTransportTests.java +++ b/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NioHttpServerTransportTests.java @@ -51,7 +51,7 @@ import org.elasticsearch.rest.BytesRestResponse; import org.elasticsearch.rest.RestChannel; import org.elasticsearch.rest.RestRequest; -import org.elasticsearch.test.NioHttpTestCase; +import org.elasticsearch.test.ESTestCase; import org.elasticsearch.threadpool.TestThreadPool; import org.elasticsearch.threadpool.ThreadPool; import org.junit.After; @@ -83,7 +83,7 @@ /** * Tests for the {@link NioHttpServerTransport} class. */ -public class NioHttpServerTransportTests extends NioHttpTestCase { +public class NioHttpServerTransportTests extends ESTestCase { private NetworkService networkService; private ThreadPool threadPool; diff --git a/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NioPipeliningIT.java b/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NioPipeliningIT.java index 4245031aa48ff..074aafd6eab4b 100644 --- a/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NioPipeliningIT.java +++ b/plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NioPipeliningIT.java @@ -20,11 +20,11 @@ package org.elasticsearch.http.nio; import io.netty.handler.codec.http.FullHttpResponse; +import org.elasticsearch.NioIntegTestCase; import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.http.HttpServerTransport; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.test.NioHttpIntegTestCase; import java.util.Collection; import java.util.Locale; @@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.is; @ClusterScope(scope = Scope.TEST, supportsDedicatedMasters = false, numDataNodes = 1) -public class NioPipeliningIT extends NioHttpIntegTestCase { +public class NioPipeliningIT extends NioIntegTestCase { @Override protected boolean addMockHttpTransport() { diff --git a/plugins/transport-nio/src/test/java/org/elasticsearch/test/NioHttpIntegTestCase.java b/plugins/transport-nio/src/test/java/org/elasticsearch/test/NioHttpIntegTestCase.java deleted file mode 100644 index d20ac8737fadf..0000000000000 --- a/plugins/transport-nio/src/test/java/org/elasticsearch/test/NioHttpIntegTestCase.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.elasticsearch.test; - -import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; - -@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class}) -public abstract class NioHttpIntegTestCase extends NioIntegTestCase { -} diff --git a/plugins/transport-nio/src/test/java/org/elasticsearch/test/NioHttpTestCase.java b/plugins/transport-nio/src/test/java/org/elasticsearch/test/NioHttpTestCase.java deleted file mode 100644 index 9e8a55170f9b7..0000000000000 --- a/plugins/transport-nio/src/test/java/org/elasticsearch/test/NioHttpTestCase.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.elasticsearch.test; - -import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; - -@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class}) -public abstract class NioHttpTestCase extends ESTestCase { -} diff --git a/plugins/transport-nio/src/test/java/org/elasticsearch/test/ObjectCleanerThreadThreadFilter.java b/plugins/transport-nio/src/test/java/org/elasticsearch/test/ObjectCleanerThreadThreadFilter.java deleted file mode 100644 index e47c536665d13..0000000000000 --- a/plugins/transport-nio/src/test/java/org/elasticsearch/test/ObjectCleanerThreadThreadFilter.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.elasticsearch.test; - -import com.carrotsearch.randomizedtesting.ThreadFilter; - -/** - * The Netty object cleaner thread is not closeable and it does not terminate in a timely manner. This means that thread leak control in - * tests will fail test suites when the object cleaner thread has not terminated. Since there is not a reliable way to terminate this thread - * we instead filter it out of thread leak control. - */ -public class ObjectCleanerThreadThreadFilter implements ThreadFilter { - - @Override - public boolean reject(final Thread t) { - // TODO: replace with constant from Netty when https://github.com/netty/netty/pull/8014 is integrated - return "ObjectCleanerThread".equals(t.getName()); - } - -} - diff --git a/plugins/transport-nio/src/test/java/org/elasticsearch/transport/nio/NioTransportIT.java b/plugins/transport-nio/src/test/java/org/elasticsearch/transport/nio/NioTransportIT.java index d1beed213a4e5..df53a4d79c7ad 100644 --- a/plugins/transport-nio/src/test/java/org/elasticsearch/transport/nio/NioTransportIT.java +++ b/plugins/transport-nio/src/test/java/org/elasticsearch/transport/nio/NioTransportIT.java @@ -19,6 +19,7 @@ package org.elasticsearch.transport.nio; import org.elasticsearch.ElasticsearchException; +import org.elasticsearch.NioIntegTestCase; import org.elasticsearch.Version; import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; import org.elasticsearch.client.Client; @@ -35,7 +36,6 @@ import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.test.NioIntegTestCase; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TcpChannel; import org.elasticsearch.transport.TcpTransport; diff --git a/qa/smoke-test-client/src/test/java/org/elasticsearch/smoketest/ESSmokeClientTestCase.java b/qa/smoke-test-client/src/test/java/org/elasticsearch/smoketest/ESSmokeClientTestCase.java index 5406c5dfde423..8f32271948763 100644 --- a/qa/smoke-test-client/src/test/java/org/elasticsearch/smoketest/ESSmokeClientTestCase.java +++ b/qa/smoke-test-client/src/test/java/org/elasticsearch/smoketest/ESSmokeClientTestCase.java @@ -19,8 +19,6 @@ package org.elasticsearch.smoketest; -import com.carrotsearch.randomizedtesting.ThreadFilter; -import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; import org.apache.logging.log4j.Logger; import org.apache.lucene.util.LuceneTestCase; import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; @@ -64,24 +62,8 @@ * then run JUnit. If you changed the default port, set "-Dtests.cluster=localhost:PORT" when running your test. */ @LuceneTestCase.SuppressSysoutChecks(bugUrl = "we log a lot on purpose") -@ThreadLeakFilters(filters = {ESSmokeClientTestCase.ObjectCleanerThreadThreadFilter.class}) public abstract class ESSmokeClientTestCase extends LuceneTestCase { - /** - * The Netty object cleaner thread is not closeable and it does not terminate in a timely manner. This means that thread leak control in - * tests will fail test suites when the object cleaner thread has not terminated. Since there is not a reliable way to terminate this - * thread we instead filter it out of thread leak control. - */ - public static class ObjectCleanerThreadThreadFilter implements ThreadFilter { - - @Override - public boolean reject(final Thread t) { - // TODO: replace with constant from Netty when https://github.com/netty/netty/pull/8014 is integrated - return "ObjectCleanerThread".equals(t.getName()); - } - - } - /** * Key used to eventually switch to using an external cluster and provide its transport addresses */ diff --git a/qa/smoke-test-http/src/test/java/org/elasticsearch/http/HttpSmokeTestCase.java b/qa/smoke-test-http/src/test/java/org/elasticsearch/http/HttpSmokeTestCase.java index 4177a72e08baf..bac5423e751ea 100644 --- a/qa/smoke-test-http/src/test/java/org/elasticsearch/http/HttpSmokeTestCase.java +++ b/qa/smoke-test-http/src/test/java/org/elasticsearch/http/HttpSmokeTestCase.java @@ -18,13 +18,10 @@ */ package org.elasticsearch.http; -import com.carrotsearch.randomizedtesting.ThreadFilter; -import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; import org.elasticsearch.common.network.NetworkModule; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESTestCase; import org.elasticsearch.transport.MockTcpTransportPlugin; import org.elasticsearch.transport.Netty4Plugin; import org.elasticsearch.transport.nio.MockNioTransportPlugin; @@ -34,19 +31,8 @@ import java.util.Arrays; import java.util.Collection; -@ThreadLeakFilters(filters = {HttpSmokeTestCase.ObjectCleanerThreadThreadFilter.class}) public abstract class HttpSmokeTestCase extends ESIntegTestCase { - public static class ObjectCleanerThreadThreadFilter implements ThreadFilter { - - @Override - public boolean reject(final Thread t) { - // TODO: replace with constant from Netty when https://github.com/netty/netty/pull/8014 is integrated - return "ObjectCleanerThread".equals(t.getName()); - } - - } - private static String nodeTransportTypeKey; private static String nodeHttpTypeKey; private static String clientTypeKey; diff --git a/x-pack/plugin/core/src/main/plugin-metadata/plugin-security.policy b/x-pack/plugin/core/src/main/plugin-metadata/plugin-security.policy index 1f1bd66005693..0cd7a32bcc47b 100644 --- a/x-pack/plugin/core/src/main/plugin-metadata/plugin-security.policy +++ b/x-pack/plugin/core/src/main/plugin-metadata/plugin-security.policy @@ -15,8 +15,6 @@ grant { grant codeBase "${codebase.netty-common}" { // for reading the system-wide configuration for the backlog of established sockets permission java.io.FilePermission "/proc/sys/net/core/somaxconn", "read"; - - permission java.lang.RuntimePermission "setContextClassLoader"; }; grant codeBase "${codebase.netty-transport}" { diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/license/AbstractLicensesIntegrationTestCase.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/license/AbstractLicensesIntegrationTestCase.java index 57ba7a0c4674d..e9c9ba95bfd38 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/license/AbstractLicensesIntegrationTestCase.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/license/AbstractLicensesIntegrationTestCase.java @@ -3,7 +3,6 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ - package org.elasticsearch.license; import org.elasticsearch.analysis.common.CommonAnalysisPlugin; @@ -14,16 +13,16 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.plugins.Plugin; +import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin; import org.elasticsearch.xpack.core.XPackClientPlugin; import org.elasticsearch.xpack.core.XPackSettings; -import org.elasticsearch.xpack.core.test.XPackIntegTestCase; import java.util.Arrays; import java.util.Collection; import java.util.concurrent.CountDownLatch; -public abstract class AbstractLicensesIntegrationTestCase extends XPackIntegTestCase { +public abstract class AbstractLicensesIntegrationTestCase extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/license/StartBasicLicenseTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/license/StartBasicLicenseTests.java index 2b0d60f321c92..fc8e25e3ccca9 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/license/StartBasicLicenseTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/license/StartBasicLicenseTests.java @@ -3,7 +3,6 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ - package org.elasticsearch.license; import org.elasticsearch.client.Response; diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/test/ObjectCleanerThreadThreadFilter.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/test/ObjectCleanerThreadThreadFilter.java deleted file mode 100644 index e911920953ac2..0000000000000 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/test/ObjectCleanerThreadThreadFilter.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -package org.elasticsearch.xpack.core.test; - -import com.carrotsearch.randomizedtesting.ThreadFilter; - -/** - * The Netty object cleaner thread is not closeable and it does not terminate in a timely manner. This means that thread leak control in - * tests will fail test suites when the object cleaner thread has not terminated. Since there is not a reliable way to terminate this - * thread we instead filter it out of thread leak control. - */ -public class ObjectCleanerThreadThreadFilter implements ThreadFilter { - - @Override - public boolean reject(final Thread t) { - // TODO: replace with constant from Netty when https://github.com/netty/netty/pull/8014 is integrated - return "ObjectCleanerThread".equals(t.getName()); - } - -} diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/test/XPackIntegTestCase.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/test/XPackIntegTestCase.java deleted file mode 100644 index 87cf2d87f02a4..0000000000000 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/test/XPackIntegTestCase.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -package org.elasticsearch.xpack.core.test; - -import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; -import org.elasticsearch.test.ESIntegTestCase; - -@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class}) -public abstract class XPackIntegTestCase extends ESIntegTestCase { -} diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/test/XPackSingleNodeTestCase.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/test/XPackSingleNodeTestCase.java deleted file mode 100644 index a3cbd875503f5..0000000000000 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/test/XPackSingleNodeTestCase.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -package org.elasticsearch.xpack.core.test; - -import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; -import org.elasticsearch.test.ESSingleNodeTestCase; - -@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class}) -public abstract class XPackSingleNodeTestCase extends ESSingleNodeTestCase { -} diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/test/XPackTestCase.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/test/XPackTestCase.java deleted file mode 100644 index ab7948eeae726..0000000000000 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/test/XPackTestCase.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -package org.elasticsearch.xpack.core.test; - -import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; -import org.elasticsearch.test.ESTestCase; - -@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class}) -public abstract class XPackTestCase extends ESTestCase { -} diff --git a/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java b/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java index 29c0ef2516553..7a1ca6a00f46c 100644 --- a/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java +++ b/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java @@ -27,17 +27,19 @@ import org.elasticsearch.test.MockHttpTransport; import org.elasticsearch.test.discovery.TestZenDiscovery; import org.elasticsearch.xpack.core.XPackSettings; +import org.elasticsearch.xpack.core.ml.action.GetDatafeedsAction; +import org.elasticsearch.xpack.core.ml.action.GetJobsAction; +import org.elasticsearch.xpack.core.ml.action.util.QueryPage; +import org.elasticsearch.xpack.core.ml.client.MachineLearningClient; +import org.elasticsearch.xpack.ml.LocalStateMachineLearning; +import org.elasticsearch.xpack.ml.MachineLearning; import org.elasticsearch.xpack.core.ml.MachineLearningField; import org.elasticsearch.xpack.core.ml.action.CloseJobAction; import org.elasticsearch.xpack.core.ml.action.DeleteDatafeedAction; import org.elasticsearch.xpack.core.ml.action.DeleteJobAction; -import org.elasticsearch.xpack.core.ml.action.GetDatafeedsAction; import org.elasticsearch.xpack.core.ml.action.GetDatafeedsStatsAction; -import org.elasticsearch.xpack.core.ml.action.GetJobsAction; import org.elasticsearch.xpack.core.ml.action.GetJobsStatsAction; import org.elasticsearch.xpack.core.ml.action.StopDatafeedAction; -import org.elasticsearch.xpack.core.ml.action.util.QueryPage; -import org.elasticsearch.xpack.core.ml.client.MachineLearningClient; import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig; import org.elasticsearch.xpack.core.ml.datafeed.DatafeedState; import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; @@ -47,9 +49,6 @@ import org.elasticsearch.xpack.core.ml.job.config.Job; import org.elasticsearch.xpack.core.ml.job.config.JobState; import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.DataCounts; -import org.elasticsearch.xpack.core.test.XPackIntegTestCase; -import org.elasticsearch.xpack.ml.LocalStateMachineLearning; -import org.elasticsearch.xpack.ml.MachineLearning; import org.junit.After; import org.junit.Before; @@ -70,7 +69,7 @@ */ @ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0, transportClientRatio = 0, supportsDedicatedMasters = false) -public abstract class BaseMlIntegTestCase extends XPackIntegTestCase { +public abstract class BaseMlIntegTestCase extends ESIntegTestCase { @Override protected boolean ignoreExternalCluster() { diff --git a/x-pack/plugin/security/src/main/plugin-metadata/plugin-security.policy b/x-pack/plugin/security/src/main/plugin-metadata/plugin-security.policy index f56affec02be0..857c2f6e472d5 100644 --- a/x-pack/plugin/security/src/main/plugin-metadata/plugin-security.policy +++ b/x-pack/plugin/security/src/main/plugin-metadata/plugin-security.policy @@ -23,8 +23,6 @@ grant codeBase "${codebase.xmlsec-2.0.8.jar}" { grant codeBase "${codebase.netty-common}" { // for reading the system-wide configuration for the backlog of established sockets permission java.io.FilePermission "/proc/sys/net/core/somaxconn", "read"; - - permission java.lang.RuntimePermission "setContextClassLoader"; }; grant codeBase "${codebase.netty-transport}" { diff --git a/x-pack/plugin/security/src/test/java/org/elasticsearch/test/SecurityIntegTestCase.java b/x-pack/plugin/security/src/test/java/org/elasticsearch/test/SecurityIntegTestCase.java index 20e2f904323dc..815f26942767a 100644 --- a/x-pack/plugin/security/src/test/java/org/elasticsearch/test/SecurityIntegTestCase.java +++ b/x-pack/plugin/security/src/test/java/org/elasticsearch/test/SecurityIntegTestCase.java @@ -3,7 +3,6 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ - package org.elasticsearch.test; import io.netty.util.ThreadDeathWatcher; @@ -42,8 +41,8 @@ import org.elasticsearch.xpack.core.security.SecurityField; import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; import org.elasticsearch.xpack.core.security.client.SecurityClient; -import org.elasticsearch.xpack.core.test.XPackIntegTestCase; import org.elasticsearch.xpack.security.LocalStateSecurity; + import org.elasticsearch.xpack.security.support.SecurityIndexManager; import org.junit.AfterClass; import org.junit.Before; @@ -76,7 +75,7 @@ * * @see SecuritySettingsSource */ -public abstract class SecurityIntegTestCase extends XPackIntegTestCase { +public abstract class SecurityIntegTestCase extends ESIntegTestCase { private static SecuritySettingsSource SECURITY_DEFAULT_SETTINGS; protected static SecureString BOOTSTRAP_PASSWORD = null; diff --git a/x-pack/plugin/security/src/test/java/org/elasticsearch/test/SecuritySingleNodeTestCase.java b/x-pack/plugin/security/src/test/java/org/elasticsearch/test/SecuritySingleNodeTestCase.java index 1c6f8e847d39c..cda627806e7b5 100644 --- a/x-pack/plugin/security/src/test/java/org/elasticsearch/test/SecuritySingleNodeTestCase.java +++ b/x-pack/plugin/security/src/test/java/org/elasticsearch/test/SecuritySingleNodeTestCase.java @@ -3,7 +3,6 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ - package org.elasticsearch.test; import io.netty.util.ThreadDeathWatcher; @@ -23,7 +22,6 @@ import org.elasticsearch.license.LicenseService; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.plugins.PluginInfo; -import org.elasticsearch.xpack.core.test.XPackSingleNodeTestCase; import org.elasticsearch.xpack.security.LocalStateSecurity; import org.junit.AfterClass; import org.junit.Before; @@ -51,7 +49,7 @@ * {@link SecurityIntegTestCase} due to simplicity and improved speed from not needing to start * multiple nodes and wait for the cluster to form. */ -public abstract class SecuritySingleNodeTestCase extends XPackSingleNodeTestCase { +public abstract class SecuritySingleNodeTestCase extends ESSingleNodeTestCase { private static SecuritySettingsSource SECURITY_DEFAULT_SETTINGS = null; private static CustomSecuritySettingsSource customSecuritySettingsSource = null; diff --git a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransportTests.java b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransportTests.java index d964f4f997bf1..3ef298f3f232d 100644 --- a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransportTests.java +++ b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransportTests.java @@ -22,8 +22,6 @@ import org.elasticsearch.xpack.core.XPackSettings; import org.elasticsearch.xpack.core.ssl.SSLClientAuth; import org.elasticsearch.xpack.core.ssl.SSLService; -import org.elasticsearch.xpack.core.test.XPackIntegTestCase; -import org.elasticsearch.xpack.core.test.XPackTestCase; import org.elasticsearch.xpack.security.transport.filter.IPFilter; import org.junit.Before; @@ -40,7 +38,7 @@ import static org.hamcrest.Matchers.not; import static org.mockito.Mockito.mock; -public class SecurityNetty4HttpServerTransportTests extends XPackTestCase { +public class SecurityNetty4HttpServerTransportTests extends ESTestCase { private SSLService sslService; private Environment env; diff --git a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4ServerTransportTests.java b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4ServerTransportTests.java index 90fc0d5cbad31..3d9227319a870 100644 --- a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4ServerTransportTests.java +++ b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4ServerTransportTests.java @@ -21,7 +21,6 @@ import org.elasticsearch.xpack.core.security.transport.netty4.SecurityNetty4Transport; import org.elasticsearch.xpack.core.ssl.SSLClientAuth; import org.elasticsearch.xpack.core.ssl.SSLService; -import org.elasticsearch.xpack.core.test.XPackTestCase; import org.junit.Before; import javax.net.ssl.SSLEngine; @@ -34,7 +33,7 @@ import static org.hamcrest.Matchers.notNullValue; import static org.mockito.Mockito.mock; -public class SecurityNetty4ServerTransportTests extends XPackTestCase { +public class SecurityNetty4ServerTransportTests extends ESTestCase { private Environment env; private SSLService sslService; diff --git a/x-pack/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/AbstractWatcherIntegrationTestCase.java b/x-pack/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/AbstractWatcherIntegrationTestCase.java index 5926701ad0490..3461c530b4417 100644 --- a/x-pack/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/AbstractWatcherIntegrationTestCase.java +++ b/x-pack/plugin/watcher/src/test/java/org/elasticsearch/xpack/watcher/test/AbstractWatcherIntegrationTestCase.java @@ -31,6 +31,7 @@ import org.elasticsearch.script.Script; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.builder.SearchSourceBuilder; +import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.elasticsearch.test.InternalTestCluster; import org.elasticsearch.test.disruption.ServiceDisruptionScheme; @@ -39,7 +40,6 @@ import org.elasticsearch.xpack.core.XPackClient; import org.elasticsearch.xpack.core.XPackSettings; import org.elasticsearch.xpack.core.security.SecurityField; -import org.elasticsearch.xpack.core.test.XPackIntegTestCase; import org.elasticsearch.xpack.core.watcher.WatcherState; import org.elasticsearch.xpack.core.watcher.client.WatcherClient; import org.elasticsearch.xpack.core.watcher.execution.ExecutionState; @@ -94,7 +94,7 @@ import static org.hamcrest.core.IsNot.not; @ClusterScope(scope = SUITE, numClientNodes = 0, transportClientRatio = 0, maxNumDataNodes = 3) -public abstract class AbstractWatcherIntegrationTestCase extends XPackIntegTestCase { +public abstract class AbstractWatcherIntegrationTestCase extends ESIntegTestCase { public static final String WATCHER_LANG = Script.DEFAULT_SCRIPT_LANG; diff --git a/x-pack/qa/audit-tests/src/test/java/org/elasticsearch/xpack/security/audit/IndexAuditIT.java b/x-pack/qa/audit-tests/src/test/java/org/elasticsearch/xpack/security/audit/IndexAuditIT.java index 26a98691f1323..3467316c24f6c 100644 --- a/x-pack/qa/audit-tests/src/test/java/org/elasticsearch/xpack/security/audit/IndexAuditIT.java +++ b/x-pack/qa/audit-tests/src/test/java/org/elasticsearch/xpack/security/audit/IndexAuditIT.java @@ -6,7 +6,6 @@ package org.elasticsearch.xpack.security.audit; import com.carrotsearch.hppc.cursors.ObjectCursor; -import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; import org.apache.http.message.BasicHeader; import org.elasticsearch.action.admin.indices.template.delete.DeleteIndexTemplateResponse; import org.elasticsearch.action.admin.indices.template.get.GetIndexTemplatesResponse; @@ -25,9 +24,8 @@ import org.elasticsearch.test.TestCluster; import org.elasticsearch.xpack.core.XPackClientPlugin; import org.elasticsearch.xpack.core.security.SecurityField; -import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; -import org.elasticsearch.xpack.core.test.ObjectCleanerThreadThreadFilter; import org.elasticsearch.xpack.security.audit.index.IndexAuditTrail; +import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; import java.io.IOException; import java.net.InetSocketAddress; @@ -40,7 +38,6 @@ import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.is; -@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class}) public class IndexAuditIT extends ESIntegTestCase { private static final String USER = "test_user"; private static final String PASS = "x-pack-test-password"; diff --git a/x-pack/qa/ml-native-tests/src/test/java/org/elasticsearch/xpack/ml/integration/MlNativeAutodetectIntegTestCase.java b/x-pack/qa/ml-native-tests/src/test/java/org/elasticsearch/xpack/ml/integration/MlNativeAutodetectIntegTestCase.java index a744f3ebb6380..f70efc72506d3 100644 --- a/x-pack/qa/ml-native-tests/src/test/java/org/elasticsearch/xpack/ml/integration/MlNativeAutodetectIntegTestCase.java +++ b/x-pack/qa/ml-native-tests/src/test/java/org/elasticsearch/xpack/ml/integration/MlNativeAutodetectIntegTestCase.java @@ -5,7 +5,6 @@ */ package org.elasticsearch.xpack.ml.integration; -import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; import org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksRequest; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.client.Client; @@ -35,7 +34,6 @@ import org.elasticsearch.search.sort.SortOrder; import org.elasticsearch.tasks.Task; import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.SecuritySettingsSourceField; import org.elasticsearch.transport.Netty4Plugin; import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin; @@ -86,7 +84,6 @@ import org.elasticsearch.xpack.core.ml.job.results.Result; import org.elasticsearch.xpack.core.security.SecurityField; import org.elasticsearch.xpack.core.security.authc.TokenMetaData; -import org.elasticsearch.xpack.core.test.ObjectCleanerThreadThreadFilter; import java.io.IOException; import java.net.URISyntaxException; @@ -110,7 +107,6 @@ /** * Base class of ML integration tests that use a native autodetect process */ -@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class}) abstract class MlNativeAutodetectIntegTestCase extends ESIntegTestCase { private List jobs = new ArrayList<>(); diff --git a/x-pack/qa/security-client-tests/build.gradle b/x-pack/qa/security-client-tests/build.gradle index 9706d554e95c9..4e517f4d3633e 100644 --- a/x-pack/qa/security-client-tests/build.gradle +++ b/x-pack/qa/security-client-tests/build.gradle @@ -3,7 +3,6 @@ apply plugin: 'elasticsearch.rest-test' dependencies { testCompile project(path: xpackModule('core'), configuration: 'runtime') - testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') testCompile project(path: xpackProject('transport-client').path, configuration: 'runtime') } diff --git a/x-pack/qa/security-client-tests/src/test/java/org/elasticsearch/xpack/security/qa/SecurityTransportClientIT.java b/x-pack/qa/security-client-tests/src/test/java/org/elasticsearch/xpack/security/qa/SecurityTransportClientIT.java index 5342c2bd78095..519f365d515a0 100644 --- a/x-pack/qa/security-client-tests/src/test/java/org/elasticsearch/xpack/security/qa/SecurityTransportClientIT.java +++ b/x-pack/qa/security-client-tests/src/test/java/org/elasticsearch/xpack/security/qa/SecurityTransportClientIT.java @@ -5,7 +5,6 @@ */ package org.elasticsearch.xpack.security.qa; -import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; import org.elasticsearch.ElasticsearchSecurityException; import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; import org.elasticsearch.action.admin.cluster.node.info.NodeInfo; @@ -16,11 +15,10 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.xpack.client.PreBuiltXPackTransportClient; +import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.xpack.core.XPackClientPlugin; +import org.elasticsearch.xpack.client.PreBuiltXPackTransportClient; import org.elasticsearch.xpack.core.security.SecurityField; -import org.elasticsearch.xpack.core.test.ObjectCleanerThreadThreadFilter; -import org.elasticsearch.xpack.core.test.XPackIntegTestCase; import java.util.Collection; import java.util.Collections; @@ -34,9 +32,7 @@ /** * Integration tests that test a transport client with security being loaded that connect to an external cluster */ -@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class}) -public class SecurityTransportClientIT extends XPackIntegTestCase { - +public class SecurityTransportClientIT extends ESIntegTestCase { static final String ADMIN_USER_PW = "test_user:x-pack-test-password"; static final String TRANSPORT_USER_PW = "transport:x-pack-test-password"; diff --git a/x-pack/qa/security-example-spi-extension/build.gradle b/x-pack/qa/security-example-spi-extension/build.gradle index 94a7bccca8034..b2fac075cb315 100644 --- a/x-pack/qa/security-example-spi-extension/build.gradle +++ b/x-pack/qa/security-example-spi-extension/build.gradle @@ -9,7 +9,6 @@ esplugin { dependencies { compileOnly project(path: xpackModule('core'), configuration: 'runtime') - testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') testCompile project(path: xpackProject('transport-client').path, configuration: 'runtime') } diff --git a/x-pack/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/realm/CustomRealmIT.java b/x-pack/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/realm/CustomRealmIT.java index 8f8f45f0448b6..65ec595a0d409 100644 --- a/x-pack/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/realm/CustomRealmIT.java +++ b/x-pack/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/realm/CustomRealmIT.java @@ -3,7 +3,6 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ - package org.elasticsearch.example.realm; import org.apache.http.message.BasicHeader; @@ -20,9 +19,9 @@ import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.Environment; import org.elasticsearch.plugins.Plugin; +import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.xpack.client.PreBuiltXPackTransportClient; import org.elasticsearch.xpack.core.XPackClientPlugin; -import org.elasticsearch.xpack.core.test.XPackIntegTestCase; import java.util.Collection; import java.util.Collections; @@ -33,7 +32,7 @@ /** * Integration test to test authentication with the custom realm */ -public class CustomRealmIT extends XPackIntegTestCase { +public class CustomRealmIT extends ESIntegTestCase { @Override protected Settings externalClusterClientSettings() { diff --git a/x-pack/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/role/CustomRolesProviderIT.java b/x-pack/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/role/CustomRolesProviderIT.java index 85b34a9612f46..4e1fb72256086 100644 --- a/x-pack/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/role/CustomRolesProviderIT.java +++ b/x-pack/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/role/CustomRolesProviderIT.java @@ -18,7 +18,6 @@ import org.elasticsearch.xpack.core.XPackClientPlugin; import org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken; import org.elasticsearch.xpack.core.security.client.SecurityClient; -import org.elasticsearch.xpack.core.test.XPackIntegTestCase; import java.util.Collection; import java.util.Collections; @@ -32,7 +31,7 @@ /** * Integration test for custom roles providers. */ -public class CustomRolesProviderIT extends XPackIntegTestCase { +public class CustomRolesProviderIT extends ESIntegTestCase { private static final String TEST_USER = "test_user"; private static final String TEST_PWD = "change_me"; diff --git a/x-pack/qa/security-migrate-tests/build.gradle b/x-pack/qa/security-migrate-tests/build.gradle index de6f1c86b993f..7ccf6d2349b8b 100644 --- a/x-pack/qa/security-migrate-tests/build.gradle +++ b/x-pack/qa/security-migrate-tests/build.gradle @@ -3,7 +3,6 @@ apply plugin: 'elasticsearch.rest-test' dependencies { testCompile project(path: xpackModule('core'), configuration: 'runtime') - testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') testCompile project(path: xpackModule('security'), configuration: 'runtime') testCompile project(path: xpackProject('transport-client').path, configuration: 'runtime') } diff --git a/x-pack/qa/security-migrate-tests/src/test/java/org/elasticsearch/xpack/security/MigrateToolTestCase.java b/x-pack/qa/security-migrate-tests/src/test/java/org/elasticsearch/xpack/security/MigrateToolTestCase.java index e7f3a5ef48061..2987c1afc8daf 100644 --- a/x-pack/qa/security-migrate-tests/src/test/java/org/elasticsearch/xpack/security/MigrateToolTestCase.java +++ b/x-pack/qa/security-migrate-tests/src/test/java/org/elasticsearch/xpack/security/MigrateToolTestCase.java @@ -5,7 +5,6 @@ */ package org.elasticsearch.xpack.security; -import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; import org.apache.logging.log4j.Logger; import org.apache.lucene.util.LuceneTestCase; import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; @@ -14,10 +13,8 @@ import org.elasticsearch.common.logging.ESLoggerFactory; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.TransportAddress; -import org.elasticsearch.test.ESTestCase; import org.elasticsearch.xpack.client.PreBuiltXPackTransportClient; import org.elasticsearch.xpack.core.security.SecurityField; -import org.elasticsearch.xpack.core.test.ObjectCleanerThreadThreadFilter; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; @@ -43,7 +40,6 @@ * then run JUnit. If you changed the default port, set "tests.cluster=localhost:PORT" when running * your test. */ -@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class}) @LuceneTestCase.SuppressSysoutChecks(bugUrl = "we log a lot on purpose") public abstract class MigrateToolTestCase extends LuceneTestCase { diff --git a/x-pack/qa/smoke-test-plugins-ssl/build.gradle b/x-pack/qa/smoke-test-plugins-ssl/build.gradle index 7c1f7a8d0e558..595c562af3707 100644 --- a/x-pack/qa/smoke-test-plugins-ssl/build.gradle +++ b/x-pack/qa/smoke-test-plugins-ssl/build.gradle @@ -16,7 +16,6 @@ apply plugin: 'elasticsearch.rest-test' dependencies { testCompile project(path: xpackModule('core'), configuration: 'runtime') - testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') } String outputDir = "${buildDir}/generated-resources/${project.name}" diff --git a/x-pack/qa/smoke-test-plugins-ssl/src/test/java/org/elasticsearch/smoketest/SmokeTestMonitoringWithSecurityIT.java b/x-pack/qa/smoke-test-plugins-ssl/src/test/java/org/elasticsearch/smoketest/SmokeTestMonitoringWithSecurityIT.java index 02c2faad2b085..f8d1dd5e2b717 100644 --- a/x-pack/qa/smoke-test-plugins-ssl/src/test/java/org/elasticsearch/smoketest/SmokeTestMonitoringWithSecurityIT.java +++ b/x-pack/qa/smoke-test-plugins-ssl/src/test/java/org/elasticsearch/smoketest/SmokeTestMonitoringWithSecurityIT.java @@ -17,7 +17,6 @@ import org.elasticsearch.xpack.core.action.XPackUsageResponse; import org.elasticsearch.xpack.core.monitoring.MonitoringFeatureSetUsage; import org.elasticsearch.xpack.core.security.SecurityField; -import org.elasticsearch.xpack.core.test.XPackIntegTestCase; import org.junit.After; import org.junit.Before; @@ -42,7 +41,7 @@ * then uses a transport client to check that the data have been correctly received and * indexed in the cluster. */ -public class SmokeTestMonitoringWithSecurityIT extends XPackIntegTestCase { +public class SmokeTestMonitoringWithSecurityIT extends ESIntegTestCase { private static final String USER = "test_user"; private static final String PASS = "x-pack-test-password"; private static final String MONITORING_PATTERN = ".monitoring-*"; diff --git a/x-pack/qa/transport-client-tests/build.gradle b/x-pack/qa/transport-client-tests/build.gradle index d179fee378c63..c864a9084cba8 100644 --- a/x-pack/qa/transport-client-tests/build.gradle +++ b/x-pack/qa/transport-client-tests/build.gradle @@ -3,7 +3,6 @@ apply plugin: 'elasticsearch.rest-test' dependencies { testCompile project(path: xpackModule('core'), configuration: 'runtime') - testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') testCompile project(path: xpackProject('transport-client').path, configuration: 'runtime') } diff --git a/x-pack/qa/transport-client-tests/src/test/java/org/elasticsearch/xpack/ml/client/ESXPackSmokeClientTestCase.java b/x-pack/qa/transport-client-tests/src/test/java/org/elasticsearch/xpack/ml/client/ESXPackSmokeClientTestCase.java index 4eb845ec9e90e..c77715431ec5e 100644 --- a/x-pack/qa/transport-client-tests/src/test/java/org/elasticsearch/xpack/ml/client/ESXPackSmokeClientTestCase.java +++ b/x-pack/qa/transport-client-tests/src/test/java/org/elasticsearch/xpack/ml/client/ESXPackSmokeClientTestCase.java @@ -5,7 +5,6 @@ */ package org.elasticsearch.xpack.ml.client; -import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters; import org.apache.logging.log4j.Logger; import org.apache.lucene.util.LuceneTestCase; import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; @@ -16,7 +15,6 @@ import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.env.Environment; import org.elasticsearch.xpack.client.PreBuiltXPackTransportClient; -import org.elasticsearch.xpack.core.test.ObjectCleanerThreadThreadFilter; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; @@ -48,7 +46,6 @@ * test. */ @LuceneTestCase.SuppressSysoutChecks(bugUrl = "we log a lot on purpose") -@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class}) public abstract class ESXPackSmokeClientTestCase extends LuceneTestCase { /**