Revert upgrade to Netty 4.1.25.Final (#31282)
This reverts upgrading to Netty 4.1.25.Final until we have a cleaner solution to dealing with the object cleaner thread.
This commit is contained in:
parent
905663a942
commit
0bfd18cc8b
|
@ -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.util.concurrent.ThreadContext;
|
|||
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 java.util.Collections.singletonMap;
|
|||
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;
|
||||
|
||||
|
|
|
@ -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.settings.Settings;
|
|||
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 @@ import static org.hamcrest.Matchers.hasSize;
|
|||
* 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;
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
|
@ -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'
|
||||
]
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
63b5fa95c74785e16f2c30ce268bc222e35c8cb5
|
|
@ -1 +0,0 @@
|
|||
f366d0cc87b158ca064d27507127e3cc4eb2f089
|
|
@ -0,0 +1 @@
|
|||
d84a1f21768b7309c2954521cf5a1f46c2309eb1
|
|
@ -1 +0,0 @@
|
|||
3e465c75bead40d06b5b9c0612b37cf77c548887
|
|
@ -0,0 +1 @@
|
|||
d64312378b438dfdad84267c599a053327c6f02a
|
|
@ -1 +0,0 @@
|
|||
70888d3f2a829541378f68503ddd52c3193df35a
|
|
@ -0,0 +1 @@
|
|||
177a6b30cca92f6f5f9873c9befd681377a4c328
|
|
@ -1 +0,0 @@
|
|||
e17d5c05c101fe14536ce3fb34b36c54e04791f6
|
|
@ -0,0 +1 @@
|
|||
fec0e63e7dd7f4eeef7ea8dc47a1ff32dfc7ebc2
|
|
@ -1 +0,0 @@
|
|||
ecdfb8fe93a8b75db3ea8746d3437eed845c24bd
|
|
@ -0,0 +1 @@
|
|||
f6eb553b53fb3a90a8ac1170697093fed82eae28
|
|
@ -1 +0,0 @@
|
|||
dc0965d00746b782b33f419b005cbc130973030d
|
|
@ -0,0 +1 @@
|
|||
3c8ee2c4d4a1cbb947a5c184c7aeb2204260958b
|
|
@ -1 +0,0 @@
|
|||
19a6f1f649894b6705aa9d8cbcced188dff133b0
|
|
@ -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";
|
||||
};
|
||||
|
|
|
@ -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() {
|
|
@ -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.BytesRestResponse;
|
|||
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.containsString;
|
|||
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;
|
||||
|
|
|
@ -41,7 +41,6 @@ import io.netty.handler.codec.http.HttpResponse;
|
|||
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.indices.breaker.NoneCircuitBreakerService;
|
|||
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.not;
|
|||
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;
|
||||
|
|
|
@ -36,9 +36,9 @@ import io.netty.handler.codec.http.HttpRequest;
|
|||
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.HttpResponseStatus.OK;
|
|||
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);
|
||||
|
|
|
@ -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 @@ import static org.hamcrest.Matchers.hasSize;
|
|||
* 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);
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@ import io.netty.handler.codec.http.FullHttpResponse;
|
|||
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.HttpPipelinedRequest;
|
|||
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 @@ import static org.hamcrest.Matchers.contains;
|
|||
/**
|
||||
* 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;
|
||||
|
|
|
@ -38,7 +38,6 @@ import io.netty.handler.codec.http.HttpMethod;
|
|||
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.indices.breaker.NoneCircuitBreakerService;
|
|||
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 @@ import static org.hamcrest.Matchers.is;
|
|||
/**
|
||||
* Tests for the {@link Netty4HttpServerTransport} class.
|
||||
*/
|
||||
public class Netty4HttpServerTransportTests extends Netty4TestCase {
|
||||
public class Netty4HttpServerTransportTests extends ESTestCase {
|
||||
|
||||
private NetworkService networkService;
|
||||
private ThreadPool threadPool;
|
||||
|
|
|
@ -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.hasSize;
|
|||
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() {
|
||||
|
|
|
@ -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 {
|
||||
}
|
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
@ -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 @@ import org.elasticsearch.test.junit.annotations.TestLogging;
|
|||
|
||||
@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;
|
||||
|
||||
|
|
|
@ -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.settings.Settings;
|
|||
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 java.util.Collections;
|
|||
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());
|
||||
|
||||
|
|
|
@ -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.MockBigArrays;
|
|||
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 @@ import static org.hamcrest.Matchers.is;
|
|||
* 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")
|
||||
|
|
|
@ -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.containsString;
|
|||
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;
|
||||
|
||||
|
|
|
@ -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.is;
|
|||
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;
|
||||
|
|
|
@ -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 @@ import static org.hamcrest.Matchers.instanceOf;
|
|||
* 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()
|
||||
|
|
|
@ -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.BigArrays;
|
|||
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 java.util.Collections;
|
|||
|
||||
import static org.hamcrest.Matchers.is;
|
||||
|
||||
public class NettyTransportMultiPortTests extends Netty4TestCase {
|
||||
public class NettyTransportMultiPortTests extends ESTestCase {
|
||||
|
||||
private String host;
|
||||
|
||||
|
|
|
@ -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.emptyMap;
|
|||
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,
|
||||
|
|
|
@ -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'
|
||||
]
|
|
@ -0,0 +1 @@
|
|||
63b5fa95c74785e16f2c30ce268bc222e35c8cb5
|
|
@ -1 +0,0 @@
|
|||
f366d0cc87b158ca064d27507127e3cc4eb2f089
|
|
@ -0,0 +1 @@
|
|||
d84a1f21768b7309c2954521cf5a1f46c2309eb1
|
|
@ -1 +0,0 @@
|
|||
3e465c75bead40d06b5b9c0612b37cf77c548887
|
|
@ -0,0 +1 @@
|
|||
d64312378b438dfdad84267c599a053327c6f02a
|
|
@ -1 +0,0 @@
|
|||
70888d3f2a829541378f68503ddd52c3193df35a
|
|
@ -0,0 +1 @@
|
|||
177a6b30cca92f6f5f9873c9befd681377a4c328
|
|
@ -1 +0,0 @@
|
|||
e17d5c05c101fe14536ce3fb34b36c54e04791f6
|
|
@ -0,0 +1 @@
|
|||
fec0e63e7dd7f4eeef7ea8dc47a1ff32dfc7ebc2
|
|
@ -1 +0,0 @@
|
|||
ecdfb8fe93a8b75db3ea8746d3437eed845c24bd
|
|
@ -0,0 +1 @@
|
|||
f6eb553b53fb3a90a8ac1170697093fed82eae28
|
|
@ -1 +0,0 @@
|
|||
dc0965d00746b782b33f419b005cbc130973030d
|
|
@ -0,0 +1 @@
|
|||
3c8ee2c4d4a1cbb947a5c184c7aeb2204260958b
|
|
@ -1 +0,0 @@
|
|||
19a6f1f649894b6705aa9d8cbcced188dff133b0
|
|
@ -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";
|
||||
|
|
|
@ -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;
|
||||
|
|
@ -46,7 +46,7 @@ import org.elasticsearch.nio.NioSocketChannel;
|
|||
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.mock;
|
|||
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;
|
||||
|
|
|
@ -27,14 +27,14 @@ import io.netty.channel.ChannelOutboundHandlerAdapter;
|
|||
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();
|
||||
|
|
|
@ -38,7 +38,7 @@ import io.netty.handler.codec.http.LastHttpContent;
|
|||
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.HttpResponseStatus.OK;
|
|||
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);
|
||||
|
|
|
@ -51,7 +51,7 @@ import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
|
|||
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 @@ import static org.hamcrest.Matchers.is;
|
|||
/**
|
||||
* Tests for the {@link NioHttpServerTransport} class.
|
||||
*/
|
||||
public class NioHttpServerTransportTests extends NioHttpTestCase {
|
||||
public class NioHttpServerTransportTests extends ESTestCase {
|
||||
|
||||
private NetworkService networkService;
|
||||
private ThreadPool threadPool;
|
||||
|
|
|
@ -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.hasSize;
|
|||
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() {
|
||||
|
|
|
@ -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 {
|
||||
}
|
|
@ -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 {
|
||||
}
|
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -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.NetworkPlugin;
|
|||
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;
|
||||
|
|
|
@ -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 @@ import static org.hamcrest.Matchers.notNullValue;
|
|||
* 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
|
||||
*/
|
||||
|
|
|
@ -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 org.junit.BeforeClass;
|
|||
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;
|
||||
|
|
|
@ -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}" {
|
||||
|
|
|
@ -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.cluster.service.ClusterService;
|
|||
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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
|
@ -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 {
|
||||
}
|
|
@ -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 {
|
||||
}
|
|
@ -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 {
|
||||
}
|
|
@ -27,17 +27,19 @@ import org.elasticsearch.test.ESIntegTestCase;
|
|||
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.Detector;
|
|||
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 @@ import static org.hamcrest.Matchers.equalTo;
|
|||
*/
|
||||
@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() {
|
||||
|
|
|
@ -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}" {
|
||||
|
|
|
@ -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.XPackSettings;
|
|||
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 @@ import static org.hamcrest.core.IsCollectionContaining.hasItem;
|
|||
*
|
||||
* @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;
|
||||
|
|
|
@ -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.core.internal.io.IOUtils;
|
|||
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 @@ import static org.hamcrest.core.IsCollectionContaining.hasItem;
|
|||
* {@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;
|
||||
|
|
|
@ -22,8 +22,6 @@ import org.elasticsearch.threadpool.ThreadPool;
|
|||
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.is;
|
|||
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;
|
||||
|
|
|
@ -21,7 +21,6 @@ import org.elasticsearch.threadpool.ThreadPool;
|
|||
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.is;
|
|||
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;
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.elasticsearch.script.MockMustacheScriptEngine;
|
|||
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.test.transport.MockTransportService;
|
|||
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.Is.is;
|
|||
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;
|
||||
|
||||
|
|
|
@ -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.ESIntegTestCase;
|
|||
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 java.util.concurrent.atomic.AtomicReference;
|
|||
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";
|
||||
|
|
|
@ -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.SortBuilders;
|
|||
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.ForecastRequestStats;
|
|||
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 @@ import static org.hamcrest.Matchers.notNullValue;
|
|||
/**
|
||||
* Base class of ML integration tests that use a native autodetect process
|
||||
*/
|
||||
@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class})
|
||||
abstract class MlNativeAutodetectIntegTestCase extends ESIntegTestCase {
|
||||
|
||||
private List<Job.Builder> jobs = new ArrayList<>();
|
||||
|
|
|
@ -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')
|
||||
}
|
||||
|
||||
|
|
|
@ -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.SecureString;
|
|||
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 @@ import static org.hamcrest.Matchers.is;
|
|||
/**
|
||||
* 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";
|
||||
|
||||
|
|
|
@ -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')
|
||||
}
|
||||
|
||||
|
|
|
@ -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.transport.TransportAddress;
|
|||
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 @@ import static org.hamcrest.Matchers.is;
|
|||
/**
|
||||
* Integration test to test authentication with the custom realm
|
||||
*/
|
||||
public class CustomRealmIT extends XPackIntegTestCase {
|
||||
public class CustomRealmIT extends ESIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected Settings externalClusterClientSettings() {
|
||||
|
|
|
@ -18,7 +18,6 @@ import org.elasticsearch.test.ESIntegTestCase;
|
|||
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 @@ import static org.hamcrest.Matchers.is;
|
|||
/**
|
||||
* 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";
|
||||
|
|
|
@ -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')
|
||||
}
|
||||
|
|
|
@ -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.client.transport.TransportClient;
|
|||
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 @@ import static org.hamcrest.Matchers.notNullValue;
|
|||
* 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 {
|
||||
|
||||
|
|
|
@ -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}"
|
||||
|
|
|
@ -17,7 +17,6 @@ import org.elasticsearch.xpack.core.action.XPackUsageRequestBuilder;
|
|||
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 @@ import static org.hamcrest.Matchers.is;
|
|||
* 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-*";
|
||||
|
|
|
@ -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')
|
||||
}
|
||||
|
||||
|
|
|
@ -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.settings.Settings;
|
|||
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 @@ import static org.hamcrest.Matchers.notNullValue;
|
|||
* test.
|
||||
*/
|
||||
@LuceneTestCase.SuppressSysoutChecks(bugUrl = "we log a lot on purpose")
|
||||
@ThreadLeakFilters(filters = {ObjectCleanerThreadThreadFilter.class})
|
||||
public abstract class ESXPackSmokeClientTestCase extends LuceneTestCase {
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue