Skip to content

Commit

Permalink
[ML] Need to wait for shards to replicate in distributed test (#35541)
Browse files Browse the repository at this point in the history
Because the cluster was expanded from 1 node to 3 indices would
initially start off with 0 replicas.  If the original node was
killed before auto-expansion to 1 replica was complete then
the test would fail because the indices would be unavailable.
  • Loading branch information
droberts195 committed Nov 14, 2018
1 parent 0c343ca commit 7b5da88
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ public void testJobRelocationIsMemoryAware() throws Exception {
internalCluster().ensureAtLeastNumDataNodes(3);
ensureStableClusterOnAllNodes(3);

// Wait for the cluster to be green - this means the indices have been replicated.

ensureGreen(".ml-config", ".ml-anomalies-shared", ".ml-notifications");

// Open a big job. This should go on a different node to the 4 small ones.

setupJobWithoutDatafeed("big1", new ByteSizeValue(500, ByteSizeUnit.MB));
Expand Down

0 comments on commit 7b5da88

Please sign in to comment.