[ML] Reinstate DatafeedJobsIT::testRealtime_multipleStopCalls test (elastic/x-pack-elasticsearch#1542)

* Handle exception in action

Original commit: elastic/x-pack-elasticsearch@2c2f28115f
This commit is contained in:
David Kyle 2017-05-25 10:02:14 +01:00 committed by GitHub
parent 1bfc864193
commit 6befa83337
2 changed files with 21 additions and 13 deletions

View File

@ -379,7 +379,16 @@ public class StopDatafeedAction
listener.onResponse(new Response(true));
}
});
}, listener::onFailure));
},
e -> {
if (e instanceof ResourceNotFoundException) {
// the task has disappeared so must have stopped
listener.onResponse(new Response(true));
} else {
listener.onFailure(e);
}
}
));
}
private void sendResponseOrFailure(String datafeedId, ActionListener<Response> listener,

View File

@ -110,7 +110,6 @@ public class DatafeedJobsIT extends MlNativeAutodetectIntegTestCase {
});
}
@AwaitsFix(bugUrl="https://github.com/elastic/x-pack-elasticsearch/issues/1536")
public void testRealtime_multipleStopCalls() throws Exception {
String jobId = "realtime-job-multiple-stop";
final String datafeedId = jobId + "-datafeed";