Skip to content

Commit 73221d2

Browse files
committed
[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
1 parent d128033 commit 73221d2

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/integration/NetworkDisruptionIT.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ protected Collection<Class<? extends Plugin>> nodePlugins() {
3838
return plugins;
3939
}
4040

41-
// Remove this once the AwaitsFix below has been resolved
42-
public void testDummy() {
43-
assertTrue(true);
44-
}
45-
46-
@AwaitsFix( bugUrl = "https://github.com/elastic/elasticsearch/issues/39858")
4741
public void testJobRelocation() throws Exception {
4842
internalCluster().ensureAtLeastNumDataNodes(5);
4943
ensureStableCluster(5);

x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/support/BaseMlIntegTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ public static void deleteAllJobs(Logger logger, Client client) throws Exception
353353
protected String awaitJobOpenedAndAssigned(String jobId, String queryNode) throws Exception {
354354

355355
PersistentTasksClusterService persistentTasksClusterService =
356-
internalCluster().getInstance(PersistentTasksClusterService.class, internalCluster().getMasterName());
356+
internalCluster().getInstance(PersistentTasksClusterService.class, internalCluster().getMasterName(queryNode));
357357
// Speed up rechecks to a rate that is quicker than what settings would allow.
358358
// The check would work eventually without doing this, but the assertBusy() below
359359
// would need to wait 30 seconds, which would make the test run very slowly.

0 commit comments

Comments
 (0)