Skip to content

Commit e4fd0ce

Browse files
committed
Reduce TestLogging usage in DisruptionIT tests (#43411)
Removes `@TestLogging` annotations in `*DisruptionIT` tests, so that the only tests with annotations are those with open issues. Also adds links to the open issues in the remaining cases. Relates #43403
1 parent eeb1812 commit e4fd0ce

File tree

5 files changed

+3
-8
lines changed

5 files changed

+3
-8
lines changed

server/src/test/java/org/elasticsearch/discovery/ClusterDisruptionIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@
8383
/**
8484
* Tests various cluster operations (e.g., indexing) during disruptions.
8585
*/
86-
@TestLogging("_root:DEBUG,org.elasticsearch.cluster.service:TRACE")
8786
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0)
8887
public class ClusterDisruptionIT extends AbstractDisruptionTestCase {
8988

@@ -109,6 +108,7 @@ static ConflictMode randomMode() {
109108
"org.elasticsearch.discovery:TRACE,org.elasticsearch.action.support.replication:TRACE," +
110109
"org.elasticsearch.cluster.service:TRACE,org.elasticsearch.indices.recovery:TRACE," +
111110
"org.elasticsearch.indices.cluster:TRACE,org.elasticsearch.index.shard:TRACE")
111+
// TestLogging for https://github.com/elastic/elasticsearch/issues/41068
112112
public void testAckedIndexing() throws Exception {
113113

114114
final int seconds = !(TEST_NIGHTLY && rarely()) ? 1 : 5;

server/src/test/java/org/elasticsearch/discovery/DiscoveryDisruptionIT.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
import org.elasticsearch.test.disruption.NetworkDisruption.NetworkDisconnect;
3535
import org.elasticsearch.test.disruption.ServiceDisruptionScheme;
3636
import org.elasticsearch.test.disruption.SlowClusterStateProcessing;
37-
import org.elasticsearch.test.junit.annotations.TestLogging;
3837
import org.elasticsearch.test.transport.MockTransportService;
3938
import org.elasticsearch.transport.Transport;
4039
import org.elasticsearch.transport.TransportService;
@@ -51,7 +50,6 @@
5150
/**
5251
* Tests for discovery during disruptions.
5352
*/
54-
@TestLogging("_root:DEBUG,org.elasticsearch.cluster.service:TRACE")
5553
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0)
5654
public class DiscoveryDisruptionIT extends AbstractDisruptionTestCase {
5755

server/src/test/java/org/elasticsearch/discovery/DiskDisruptionIT.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import org.elasticsearch.test.BackgroundIndexer;
3131
import org.elasticsearch.test.ESIntegTestCase;
3232
import org.elasticsearch.test.InternalTestCluster;
33-
import org.elasticsearch.test.junit.annotations.TestLogging;
3433
import org.junit.After;
3534
import org.junit.AfterClass;
3635
import org.junit.BeforeClass;
@@ -49,7 +48,6 @@
4948
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
5049
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
5150

52-
@TestLogging("_root:DEBUG,org.elasticsearch.cluster.service:TRACE")
5351
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
5452
public class DiskDisruptionIT extends AbstractDisruptionTestCase {
5553

server/src/test/java/org/elasticsearch/discovery/MasterDisruptionIT.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
import org.elasticsearch.test.disruption.NetworkDisruption.TwoPartitions;
3838
import org.elasticsearch.test.disruption.ServiceDisruptionScheme;
3939
import org.elasticsearch.test.disruption.SingleNodeDisruption;
40-
import org.elasticsearch.test.junit.annotations.TestLogging;
4140

4241
import java.util.ArrayList;
4342
import java.util.HashSet;
@@ -52,7 +51,6 @@
5251
/**
5352
* Tests relating to the loss of the master.
5453
*/
55-
@TestLogging("_root:DEBUG,org.elasticsearch.cluster.service:TRACE")
5654
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0)
5755
public class MasterDisruptionIT extends AbstractDisruptionTestCase {
5856

server/src/test/java/org/elasticsearch/discovery/StableMasterDisruptionIT.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
* Tests relating to the loss of the master, but which work with the default fault detection settings which are rather lenient and will
6666
* not detect a master failure too quickly.
6767
*/
68-
@TestLogging("_root:DEBUG,org.elasticsearch.cluster.service:TRACE")
6968
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0)
7069
public class StableMasterDisruptionIT extends ESIntegTestCase {
7170

@@ -174,6 +173,8 @@ private void testFollowerCheckerAfterMasterReelection(NetworkLinkDisruptionType
174173
* Tests that emulates a frozen elected master node that unfreezes and pushes its cluster state to other nodes that already are
175174
* following another elected master node. These nodes should reject this cluster state and prevent them from following the stale master.
176175
*/
176+
@TestLogging("_root:DEBUG,org.elasticsearch.cluster.service:TRACE")
177+
// TestLogging for https://github.com/elastic/elasticsearch/issues/43392
177178
public void testStaleMasterNotHijackingMajority() throws Exception {
178179
final List<String> nodes = internalCluster().startNodes(3, Settings.builder()
179180
.put(LeaderChecker.LEADER_CHECK_TIMEOUT_SETTING.getKey(), "1s")

0 commit comments

Comments
 (0)