[ML] Resolve NetworkDisruptionIT (#43441)

After the network disruption a partition is created,
one side of which can form a cluster the other can't.
Ensure requests are sent to a node on the correct side
of the cluster
This commit is contained in:
David Kyle 2019-06-21 10:14:58 +01:00
parent d1280339a8
commit 73221d2265
2 changed files with 1 additions and 7 deletions

View File

@ -38,12 +38,6 @@ public class NetworkDisruptionIT extends BaseMlIntegTestCase {
return plugins;
}
// Remove this once the AwaitsFix below has been resolved
public void testDummy() {
assertTrue(true);
}
@AwaitsFix( bugUrl = "https://github.com/elastic/elasticsearch/issues/39858")
public void testJobRelocation() throws Exception {
internalCluster().ensureAtLeastNumDataNodes(5);
ensureStableCluster(5);

View File

@ -353,7 +353,7 @@ public abstract class BaseMlIntegTestCase extends ESIntegTestCase {
protected String awaitJobOpenedAndAssigned(String jobId, String queryNode) throws Exception {
PersistentTasksClusterService persistentTasksClusterService =
internalCluster().getInstance(PersistentTasksClusterService.class, internalCluster().getMasterName());
internalCluster().getInstance(PersistentTasksClusterService.class, internalCluster().getMasterName(queryNode));
// Speed up rechecks to a rate that is quicker than what settings would allow.
// The check would work eventually without doing this, but the assertBusy() below
// would need to wait 30 seconds, which would make the test run very slowly.