Skip to content

[ML] Increase assertBusy timeout in ML node failure tests #52425

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

Merged
Merged
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 @@ -451,6 +451,10 @@ private void run(String jobId, CheckedRunnable<Exception> disrupt) throws Except
// else.
persistentTasksClusterService.setRecheckInterval(TimeValue.timeValueMillis(200));

// The timeout here was increased from 10 seconds to 20 seconds in response to the changes in
// https://github.com/elastic/elasticsearch/pull/50907 - now that the cluster state is stored
// in a Lucene index it can take a while to update when there are many updates in quick
// succession, like we see in internal cluster tests of node failure scenarios
assertBusy(() -> {
ClusterState clusterState = client().admin().cluster().prepareState().get().getState();
PersistentTasksCustomMetaData tasks = clusterState.metaData().custom(PersistentTasksCustomMetaData.TYPE);
Expand All @@ -471,7 +475,7 @@ private void run(String jobId, CheckedRunnable<Exception> disrupt) throws Except
.getResponse().results().get(0);
assertEquals(DatafeedState.STARTED, datafeedStats.getDatafeedState());
assertNotNull(datafeedStats.getNode());
});
}, 20, TimeUnit.SECONDS);

long numDocs2 = randomIntBetween(2, 64);
long now2 = System.currentTimeMillis();
Expand Down