Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert upgrade to Netty 4.1.25.Final #31282

Merged
merged 1 commit into from
Jun 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down

This file was deleted.

16 changes: 8 additions & 8 deletions modules/transport-netty4/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -161,6 +161,6 @@ thirdPartyAudit.excludes = [

'org.conscrypt.AllocatedBuffer',
'org.conscrypt.BufferAllocator',
'org.conscrypt.Conscrypt',
'org.conscrypt.Conscrypt$Engines',
'org.conscrypt.HandshakeListener'
]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
63b5fa95c74785e16f2c30ce268bc222e35c8cb5

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d84a1f21768b7309c2954521cf5a1f46c2309eb1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d64312378b438dfdad84267c599a053327c6f02a

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
177a6b30cca92f6f5f9873c9befd681377a4c328

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fec0e63e7dd7f4eeef7ea8dc47a1ff32dfc7ebc2

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f6eb553b53fb3a90a8ac1170697093fed82eae28

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3c8ee2c4d4a1cbb947a5c184c7aeb2204260958b

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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() {
Expand Down

This file was deleted.

Loading