diff --git a/qa/rolling-upgrade/src/test/java/org/opensearch/neuralsearch/bwc/SemanticSearch.java b/qa/rolling-upgrade/src/test/java/org/opensearch/neuralsearch/bwc/SemanticSearch.java index e91bd5834..782efc2f2 100644 --- a/qa/rolling-upgrade/src/test/java/org/opensearch/neuralsearch/bwc/SemanticSearch.java +++ b/qa/rolling-upgrade/src/test/java/org/opensearch/neuralsearch/bwc/SemanticSearch.java @@ -9,11 +9,13 @@ import java.nio.file.Files; import java.nio.file.Path; import java.util.Map; +import lombok.extern.log4j.Log4j2; import org.opensearch.neuralsearch.TestUtils; import static org.opensearch.neuralsearch.TestUtils.NODES_BWC_CLUSTER; import static org.opensearch.neuralsearch.TestUtils.TEXT_EMBEDDING_PROCESSOR; import org.opensearch.neuralsearch.query.NeuralQueryBuilder; +@Log4j2 public class SemanticSearch extends AbstractRollingUpgradeTestCase{ private static final String PIPELINE_NAME = "nlp-pipeline"; private static final String TEST_FIELD = "test-field"; @@ -23,6 +25,9 @@ public class SemanticSearch extends AbstractRollingUpgradeTestCase{ private static final int NUM_DOCS = 1; public void testSemanticSearch() throws Exception{ + log.info("Get Cluster Type=========================="+getClusterType()); + getIndices(); + getShards(); waitForClusterHealthGreen(NODES_BWC_CLUSTER); switch (getClusterType()){ case OLD: diff --git a/src/testFixtures/java/org/opensearch/neuralsearch/BaseNeuralSearchIT.java b/src/testFixtures/java/org/opensearch/neuralsearch/BaseNeuralSearchIT.java index 9c9999aba..63e2888d7 100644 --- a/src/testFixtures/java/org/opensearch/neuralsearch/BaseNeuralSearchIT.java +++ b/src/testFixtures/java/org/opensearch/neuralsearch/BaseNeuralSearchIT.java @@ -54,8 +54,10 @@ import lombok.AllArgsConstructor; import lombok.Getter; import lombok.SneakyThrows; +import lombok.extern.log4j.Log4j2; @ThreadLeakScope(ThreadLeakScope.Scope.NONE) +@Log4j2 public abstract class BaseNeuralSearchIT extends OpenSearchSecureRestTestCase { protected static final Locale LOCALE = Locale.ROOT; @@ -850,6 +852,27 @@ protected Map getIngestionPipeline(String pipelineName) { return (Map) responseMap.get(pipelineName); } + /** + * Get indices + */ + @SneakyThrows + protected void getIndices() { + Request request = new Request("GET", "/_cat/indices"); + Response response = client().performRequest(request); + String responseBody = EntityUtils.toString(response.getEntity()); + log.info("Indices are ============================"); + log.info(responseBody); + } + + @SneakyThrows + protected void getShards() { + Request request = new Request("GET", "/_cat/shards"); + Response response = client().performRequest(request); + String responseBody = EntityUtils.toString(response.getEntity()); + log.info("Shards are ============================"); + log.info(responseBody); + } + /** * Enumeration for types of pipeline processors, used to lookup resources like create * processor request as those are type specific