Skip to content

Commit

Permalink
[ML] Increase assertBusy timeout in ML node failure tests (#52425)
Browse files Browse the repository at this point in the history
Following the change to store cluster state in Lucene indices
(#50907) it can take longer for all the cluster state updates
associated with node failure scenarios to be processed during
internal cluster tests where several nodes all run in the same
JVM.
  • Loading branch information
droberts195 authored Feb 17, 2020
1 parent e086f81 commit d7d487b
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit d7d487b

Please sign in to comment.