Skip to content

Commit ca919d9

Browse files
Account for shard count in profiling test timeout (elastic#104366)
With this commit we increase the timeout to wait for a green cluster state in the integration tests for the profiling plugin. We do this because the tests create all profiling-related indices with more shards than usual and that might take longer than usual until the cluster is green. Closes elastic#103809
1 parent 9cc331c commit ca919d9

File tree

4 files changed

+3
-8
lines changed

4 files changed

+3
-8
lines changed

x-pack/plugin/profiling/src/internalClusterTest/java/org/elasticsearch/xpack/profiling/CancellationIT.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import org.apache.http.entity.ContentType;
1111
import org.apache.http.entity.StringEntity;
1212
import org.apache.logging.log4j.LogManager;
13-
import org.apache.lucene.tests.util.LuceneTestCase;
1413
import org.apache.lucene.util.SetOnce;
1514
import org.elasticsearch.action.admin.cluster.node.info.NodeInfo;
1615
import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse;
@@ -49,7 +48,6 @@
4948
import static org.hamcrest.Matchers.greaterThan;
5049
import static org.hamcrest.Matchers.instanceOf;
5150

52-
@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/103809")
5351
public class CancellationIT extends ProfilingTestCase {
5452
@Override
5553
protected Collection<Class<? extends Plugin>> nodePlugins() {

x-pack/plugin/profiling/src/internalClusterTest/java/org/elasticsearch/xpack/profiling/GetFlameGraphActionIT.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77

88
package org.elasticsearch.xpack.profiling;
99

10-
import org.apache.lucene.tests.util.LuceneTestCase;
11-
12-
@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/103809")
1310
public class GetFlameGraphActionIT extends ProfilingTestCase {
1411
public void testGetStackTracesUnfiltered() throws Exception {
1512
GetStackTracesRequest request = new GetStackTracesRequest(1000, 600.0d, 1.0d, null, null, null, null, null, null, null, null);

x-pack/plugin/profiling/src/internalClusterTest/java/org/elasticsearch/xpack/profiling/GetStackTracesActionIT.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@
77

88
package org.elasticsearch.xpack.profiling;
99

10-
import org.apache.lucene.tests.util.LuceneTestCase;
1110
import org.elasticsearch.index.query.QueryBuilders;
1211
import org.elasticsearch.index.query.TermQueryBuilder;
1312

1413
import java.util.List;
1514

16-
@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/103809")
1715
public class GetStackTracesActionIT extends ProfilingTestCase {
1816
public void testGetStackTracesUnfiltered() throws Exception {
1917
GetStackTracesRequest request = new GetStackTracesRequest(1000, 600.0d, 1.0d, null, null, null, null, null, null, null, null);

x-pack/plugin/profiling/src/internalClusterTest/java/org/elasticsearch/xpack/profiling/ProfilingTestCase.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import org.elasticsearch.cluster.ClusterState;
1515
import org.elasticsearch.common.network.NetworkModule;
1616
import org.elasticsearch.common.settings.Settings;
17+
import org.elasticsearch.core.TimeValue;
1718
import org.elasticsearch.datastreams.DataStreamsPlugin;
1819
import org.elasticsearch.license.LicenseSettings;
1920
import org.elasticsearch.plugins.Plugin;
@@ -127,7 +128,8 @@ protected final void doSetupData() throws Exception {
127128
);
128129
allIndices.add(apmTestIndex);
129130
waitForIndices(allIndices);
130-
ensureGreen(allIndices.toArray(new String[0]));
131+
// higher timeout since we have more shards than usual
132+
ensureGreen(TimeValue.timeValueSeconds(120), allIndices.toArray(new String[0]));
131133

132134
bulkIndex("data/profiling-events-all.ndjson");
133135
bulkIndex("data/profiling-stacktraces.ndjson");

0 commit comments

Comments
 (0)