Skip to content

Commit

Permalink
Account for shard count in profiling test timeout
Browse files Browse the repository at this point in the history
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
  • Loading branch information
danielmitterdorfer committed Jan 15, 2024
1 parent d049273 commit 8379b21
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.logging.log4j.LogManager;
import org.apache.lucene.tests.util.LuceneTestCase;
import org.apache.lucene.util.SetOnce;
import org.elasticsearch.action.admin.cluster.node.info.NodeInfo;
import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse;
Expand Down Expand Up @@ -49,7 +48,6 @@
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.instanceOf;

@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/103809")
public class CancellationIT extends ProfilingTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

package org.elasticsearch.xpack.profiling;

import org.apache.lucene.tests.util.LuceneTestCase;

@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/103809")
public class GetFlameGraphActionIT extends ProfilingTestCase {
public void testGetStackTracesUnfiltered() throws Exception {
GetStackTracesRequest request = new GetStackTracesRequest(1000, 600.0d, 1.0d, null, null, null, null, null, null, null, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@

package org.elasticsearch.xpack.profiling;

import org.apache.lucene.tests.util.LuceneTestCase;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.index.query.TermQueryBuilder;

import java.util.List;

@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/103809")
public class GetStackTracesActionIT extends ProfilingTestCase {
public void testGetStackTracesUnfiltered() throws Exception {
GetStackTracesRequest request = new GetStackTracesRequest(1000, 600.0d, 1.0d, null, null, null, null, null, null, null, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.common.network.NetworkModule;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.core.TimeValue;
import org.elasticsearch.datastreams.DataStreamsPlugin;
import org.elasticsearch.license.LicenseSettings;
import org.elasticsearch.plugins.Plugin;
Expand Down Expand Up @@ -127,7 +128,8 @@ protected final void doSetupData() throws Exception {
);
allIndices.add(apmTestIndex);
waitForIndices(allIndices);
ensureGreen(allIndices.toArray(new String[0]));
// higher timeout since we have more shards than usual
ensureGreen(TimeValue.timeValueSeconds(120), allIndices.toArray(new String[0]));

bulkIndex("data/profiling-events-all.ndjson");
bulkIndex("data/profiling-stacktraces.ndjson");
Expand Down

0 comments on commit 8379b21

Please sign in to comment.