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.
This commit is contained in:
David Turner 2020-07-29 08:28:44 +01:00
parent 753fd4f6bc
commit bbacad648a
2 changed files with 2 additions and 6 deletions

View File

@ -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;

View File

@ -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;