diff --git a/qa/rolling-upgrade/src/test/java/org/opensearch/neuralsearch/bwc/BatchIngestionIT.java b/qa/rolling-upgrade/src/test/java/org/opensearch/neuralsearch/bwc/BatchIngestionIT.java index 3052b48cd..8a861f445 100644 --- a/qa/rolling-upgrade/src/test/java/org/opensearch/neuralsearch/bwc/BatchIngestionIT.java +++ b/qa/rolling-upgrade/src/test/java/org/opensearch/neuralsearch/bwc/BatchIngestionIT.java @@ -21,7 +21,7 @@ public class BatchIngestionIT extends AbstractRollingUpgradeTestCase { private static final String EMBEDDING_FIELD_NAME = "passage_embedding"; public void testBatchIngestion_SparseEncodingProcessor_E2EFlow() throws Exception { - waitForClusterHealthGreen(NODES_BWC_CLUSTER); + waitForClusterHealthGreen(NODES_BWC_CLUSTER, 90); String indexName = getIndexNameForTest(); String sparseModelId = null; switch (getClusterType()) { diff --git a/qa/rolling-upgrade/src/test/java/org/opensearch/neuralsearch/bwc/MultiModalSearchIT.java b/qa/rolling-upgrade/src/test/java/org/opensearch/neuralsearch/bwc/MultiModalSearchIT.java index 2b1492319..377397d0a 100644 --- a/qa/rolling-upgrade/src/test/java/org/opensearch/neuralsearch/bwc/MultiModalSearchIT.java +++ b/qa/rolling-upgrade/src/test/java/org/opensearch/neuralsearch/bwc/MultiModalSearchIT.java @@ -30,7 +30,7 @@ public class MultiModalSearchIT extends AbstractRollingUpgradeTestCase { // Create Text Image Embedding Processor, Ingestion Pipeline and add document // Validate process , pipeline and document count in rolling-upgrade scenario public void testTextImageEmbeddingProcessor_E2EFlow() throws Exception { - waitForClusterHealthGreen(NODES_BWC_CLUSTER); + waitForClusterHealthGreen(NODES_BWC_CLUSTER, 90); switch (getClusterType()) { case OLD: modelId = uploadTextImageEmbeddingModel(); diff --git a/qa/rolling-upgrade/src/test/java/org/opensearch/neuralsearch/bwc/NeuralSparseSearchIT.java b/qa/rolling-upgrade/src/test/java/org/opensearch/neuralsearch/bwc/NeuralSparseSearchIT.java index 0801ea201..3a27d0271 100644 --- a/qa/rolling-upgrade/src/test/java/org/opensearch/neuralsearch/bwc/NeuralSparseSearchIT.java +++ b/qa/rolling-upgrade/src/test/java/org/opensearch/neuralsearch/bwc/NeuralSparseSearchIT.java @@ -38,7 +38,7 @@ public class NeuralSparseSearchIT extends AbstractRollingUpgradeTestCase { // Create Sparse Encoding Processor, Ingestion Pipeline and add document // Validate process , pipeline and document count in rolling-upgrade scenario public void testSparseEncodingProcessor_E2EFlow() throws Exception { - waitForClusterHealthGreen(NODES_BWC_CLUSTER); + waitForClusterHealthGreen(NODES_BWC_CLUSTER, 90); switch (getClusterType()) { case OLD: modelId = uploadSparseEncodingModel(); diff --git a/qa/rolling-upgrade/src/test/java/org/opensearch/neuralsearch/bwc/SemanticSearchIT.java b/qa/rolling-upgrade/src/test/java/org/opensearch/neuralsearch/bwc/SemanticSearchIT.java index b9f7b15a9..218ef6a7a 100644 --- a/qa/rolling-upgrade/src/test/java/org/opensearch/neuralsearch/bwc/SemanticSearchIT.java +++ b/qa/rolling-upgrade/src/test/java/org/opensearch/neuralsearch/bwc/SemanticSearchIT.java @@ -25,7 +25,7 @@ public class SemanticSearchIT extends AbstractRollingUpgradeTestCase { // Create Text Embedding Processor, Ingestion Pipeline and add document // Validate process , pipeline and document count in rolling-upgrade scenario public void testSemanticSearch_E2EFlow() throws Exception { - waitForClusterHealthGreen(NODES_BWC_CLUSTER); + waitForClusterHealthGreen(NODES_BWC_CLUSTER, 90); switch (getClusterType()) { case OLD: modelId = uploadTextEmbeddingModel(); diff --git a/src/testFixtures/java/org/opensearch/neuralsearch/BaseNeuralSearchIT.java b/src/testFixtures/java/org/opensearch/neuralsearch/BaseNeuralSearchIT.java index a1dca0e3f..7f231456f 100644 --- a/src/testFixtures/java/org/opensearch/neuralsearch/BaseNeuralSearchIT.java +++ b/src/testFixtures/java/org/opensearch/neuralsearch/BaseNeuralSearchIT.java @@ -1279,15 +1279,20 @@ protected String registerModelGroup(final String modelGroupRegisterRequestBody) } // Method that waits till the health of nodes in the cluster goes green - protected void waitForClusterHealthGreen(final String numOfNodes) throws IOException { + protected void waitForClusterHealthGreen(final String numOfNodes, final int timeoutInSeconds) throws IOException { Request waitForGreen = new Request("GET", "/_cluster/health"); waitForGreen.addParameter("wait_for_nodes", numOfNodes); waitForGreen.addParameter("wait_for_status", "green"); - waitForGreen.addParameter("cluster_manager_timeout", "60s"); - waitForGreen.addParameter("timeout", "60s"); + waitForGreen.addParameter("cluster_manager_timeout", String.format(LOCALE, "%ds", timeoutInSeconds)); + waitForGreen.addParameter("timeout", String.format(LOCALE, "%ds", timeoutInSeconds)); client().performRequest(waitForGreen); } + // Method that waits till the health of nodes in the cluster goes green with default timeout value of 60 + protected void waitForClusterHealthGreen(final String numOfNodes) throws IOException { + waitForClusterHealthGreen(numOfNodes, 60); + } + /** * Add a single Doc to an index *