From bbacad648ac62516565af95404aefcf0d5e78bf9 Mon Sep 17 00:00:00 2001 From: David Turner Date: Wed, 29 Jul 2020 08:28:44 +0100 Subject: [PATCH] Fix network logging test failures (#60334) In #60297 we added some tests related to logging from the transport layer, but these tests failed occasionally since the cluster was kept alive between test invocations but the logging framework expected it only to be used for a single test. With this commit we reduce the scope of the internal test cluster to `TEST` to solve this problem. Closes #60321. --- .../elasticsearch/transport/netty4/ESLoggingHandlerIT.java | 4 +--- .../elasticsearch/transport/nio/NioTransportLoggingIT.java | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/transport-netty4/src/internalClusterTest/java/org/elasticsearch/transport/netty4/ESLoggingHandlerIT.java b/modules/transport-netty4/src/internalClusterTest/java/org/elasticsearch/transport/netty4/ESLoggingHandlerIT.java index 9abaad5c5cf..07c33f13a1e 100644 --- a/modules/transport-netty4/src/internalClusterTest/java/org/elasticsearch/transport/netty4/ESLoggingHandlerIT.java +++ b/modules/transport-netty4/src/internalClusterTest/java/org/elasticsearch/transport/netty4/ESLoggingHandlerIT.java @@ -21,7 +21,6 @@ package org.elasticsearch.transport.netty4; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; -import org.apache.lucene.util.LuceneTestCase; import org.elasticsearch.ESNetty4IntegTestCase; import org.elasticsearch.action.admin.cluster.node.hotthreads.NodesHotThreadsRequest; import org.elasticsearch.common.logging.Loggers; @@ -34,8 +33,7 @@ import org.elasticsearch.transport.TransportLogger; import java.io.IOException; -@ESIntegTestCase.ClusterScope(numDataNodes = 2) -@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/60321") +@ESIntegTestCase.ClusterScope(numDataNodes = 2, scope = ESIntegTestCase.Scope.TEST) public class ESLoggingHandlerIT extends ESNetty4IntegTestCase { private MockLogAppender appender; diff --git a/plugins/transport-nio/src/test/java/org/elasticsearch/transport/nio/NioTransportLoggingIT.java b/plugins/transport-nio/src/test/java/org/elasticsearch/transport/nio/NioTransportLoggingIT.java index 453412032ce..ae8773567ca 100644 --- a/plugins/transport-nio/src/test/java/org/elasticsearch/transport/nio/NioTransportLoggingIT.java +++ b/plugins/transport-nio/src/test/java/org/elasticsearch/transport/nio/NioTransportLoggingIT.java @@ -21,7 +21,6 @@ package org.elasticsearch.transport.nio; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; -import org.apache.lucene.util.LuceneTestCase; import org.elasticsearch.NioIntegTestCase; import org.elasticsearch.action.admin.cluster.node.hotthreads.NodesHotThreadsRequest; import org.elasticsearch.common.logging.Loggers; @@ -34,8 +33,7 @@ import org.elasticsearch.transport.TransportLogger; import java.io.IOException; -@ESIntegTestCase.ClusterScope(numDataNodes = 2) -@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/60321") +@ESIntegTestCase.ClusterScope(numDataNodes = 2, scope = ESIntegTestCase.Scope.TEST) public class NioTransportLoggingIT extends NioIntegTestCase { private MockLogAppender appender;