Skip to content

Commit cb10111

Browse files
committed
Reduce TestLogging usage in DisruptionIT tests
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 elastic#43403
1 parent 99495aa commit cb10111

File tree

5 files changed

+3
-23
lines changed

5 files changed

+3
-23
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
@@ -84,7 +84,6 @@
8484
/**
8585
* Tests various cluster operations (e.g., indexing) during disruptions.
8686
*/
87-
@TestLogging("_root:DEBUG,org.elasticsearch.cluster.service:TRACE")
8887
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
8988
public class ClusterDisruptionIT extends AbstractDisruptionTestCase {
9089

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

115115
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
@@ -31,7 +31,6 @@
3131
import org.elasticsearch.test.disruption.NetworkDisruption.NetworkDisconnect;
3232
import org.elasticsearch.test.disruption.ServiceDisruptionScheme;
3333
import org.elasticsearch.test.disruption.SlowClusterStateProcessing;
34-
import org.elasticsearch.test.junit.annotations.TestLogging;
3534
import org.elasticsearch.test.transport.MockTransportService;
3635
import org.elasticsearch.transport.Transport;
3736
import org.elasticsearch.transport.TransportService;
@@ -47,7 +46,6 @@
4746
/**
4847
* Tests for discovery during disruptions.
4948
*/
50-
@TestLogging("_root:DEBUG,org.elasticsearch.cluster.service:TRACE")
5149
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
5250
public class DiscoveryDisruptionIT extends AbstractDisruptionTestCase {
5351

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

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import org.elasticsearch.test.disruption.NetworkDisruption.TwoPartitions;
3737
import org.elasticsearch.test.disruption.ServiceDisruptionScheme;
3838
import org.elasticsearch.test.disruption.SingleNodeDisruption;
39-
import org.elasticsearch.test.junit.annotations.TestLogging;
4039

4140
import java.util.ArrayList;
4241
import java.util.HashSet;
@@ -50,7 +49,6 @@
5049
/**
5150
* Tests relating to the loss of the master.
5251
*/
53-
@TestLogging("_root:DEBUG,org.elasticsearch.cluster.service:TRACE")
5452
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
5553
public class MasterDisruptionIT extends AbstractDisruptionTestCase {
5654

@@ -94,11 +92,6 @@ public void testMasterNodeGCs() throws Exception {
9492
* This test isolates the master from rest of the cluster, waits for a new master to be elected, restores the partition
9593
* and verifies that all node agree on the new cluster state
9694
*/
97-
@TestLogging(
98-
"_root:DEBUG,"
99-
+ "org.elasticsearch.cluster.service:TRACE,"
100-
+ "org.elasticsearch.gateway:TRACE,"
101-
+ "org.elasticsearch.indices.store:TRACE")
10295
public void testIsolateMasterAndVerifyClusterStateConsensus() throws Exception {
10396
final List<String> nodes = startCluster(3);
10497

@@ -244,16 +237,6 @@ public void testVerifyApiBlocksDuringPartition() throws Exception {
244237

245238
}
246239

247-
@TestLogging(
248-
"_root:DEBUG,"
249-
+ "org.elasticsearch.action.bulk:TRACE,"
250-
+ "org.elasticsearch.action.get:TRACE,"
251-
+ "org.elasticsearch.cluster.service:TRACE,"
252-
+ "org.elasticsearch.discovery:TRACE,"
253-
+ "org.elasticsearch.indices.cluster:TRACE,"
254-
+ "org.elasticsearch.indices.recovery:TRACE,"
255-
+ "org.elasticsearch.index.seqno:TRACE,"
256-
+ "org.elasticsearch.index.shard:TRACE")
257240
public void testMappingTimeout() throws Exception {
258241
startCluster(3);
259242
createIndex("test", Settings.builder()

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

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

4342
import java.util.Arrays;
@@ -54,7 +53,6 @@
5453
/**
5554
* Tests snapshot operations during disruptions.
5655
*/
57-
@TestLogging("org.elasticsearch.snapshot:TRACE")
5856
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
5957
public class SnapshotDisruptionIT extends ESIntegTestCase {
6058

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)
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+
// 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)