mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 09:28:55 -04:00
Log more data for PrevalidateShardPathIT#testCheckShards (#109887)
`PrevalidateShardPathIT#testCheckShards` still keeps failing on CI, so we need more logging. * Add debug logging for `MasterService` events to verify that a cluster service update is triggered. * Log explanation for stuck shards regardless whether they are located on node_2 in the cluster state. See #104807
This commit is contained in:
parent
b65e02c601
commit
0145a41ea5
2 changed files with 6 additions and 4 deletions
|
@ -67,9 +67,6 @@ tests:
|
|||
- class: "org.elasticsearch.xpack.shutdown.NodeShutdownReadinessIT"
|
||||
issue: "https://github.com/elastic/elasticsearch/issues/109838"
|
||||
method: "testShutdownReadinessService"
|
||||
- class: "org.elasticsearch.cluster.PrevalidateShardPathIT"
|
||||
issue: "https://github.com/elastic/elasticsearch/issues/104807"
|
||||
method: "testCheckShards"
|
||||
- class: "org.elasticsearch.packaging.test.RpmPreservationTests"
|
||||
issue: "https://github.com/elastic/elasticsearch/issues/109898"
|
||||
method: "test30PreserveConfig"
|
||||
|
@ -82,6 +79,7 @@ tests:
|
|||
issue: "https://github.com/elastic/elasticsearch/issues/109915"
|
||||
method: "testRandomMultiValuesTopN"
|
||||
|
||||
|
||||
# Examples:
|
||||
#
|
||||
# Mute a single test case in a YAML test suite:
|
||||
|
|
|
@ -22,6 +22,7 @@ import org.elasticsearch.common.settings.Settings;
|
|||
import org.elasticsearch.common.xcontent.ChunkedToXContent;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.junit.annotations.TestLogging;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
@ -39,6 +40,10 @@ import static org.hamcrest.Matchers.equalTo;
|
|||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
|
||||
public class PrevalidateShardPathIT extends ESIntegTestCase {
|
||||
|
||||
@TestLogging(
|
||||
value = "org.elasticsearch.cluster.service.MasterService:DEBUG",
|
||||
reason = "https://github.com/elastic/elasticsearch/issues/104807"
|
||||
)
|
||||
public void testCheckShards() throws Exception {
|
||||
internalCluster().startMasterOnlyNode();
|
||||
String node1 = internalCluster().startDataOnlyNode();
|
||||
|
@ -95,7 +100,6 @@ public class PrevalidateShardPathIT extends ESIntegTestCase {
|
|||
.allShards()
|
||||
.filter(s -> s.getIndexName().equals(indexName))
|
||||
.filter(s -> node2ShardIds.contains(s.shardId()))
|
||||
.filter(s -> s.currentNodeId().equals(node2Id))
|
||||
.toList();
|
||||
logger.info("Found {} shards on the relocation source node {} in the cluster state", node2Shards, node2Id);
|
||||
for (var node2Shard : node2Shards) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue