Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2.x] increase cluster node timeout value for time consuming test cases #1064

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
Loading