[ML] [Data Frame] Adding pending task wait to the hlrc cleanup (#42907) (#42930)

This commit is contained in:
Benjamin Trent 2019-06-06 08:33:49 -05:00 committed by GitHub
parent ed186b4485
commit 02e6acf2d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -140,7 +140,7 @@ public class DataFrameTransformIT extends ESRestHighLevelClientTestCase {
}
@After
public void cleanUpTransforms() throws IOException {
public void cleanUpTransforms() throws Exception {
for (String transformId : transformsToClean) {
highLevelClient().dataFrame().stopDataFrameTransform(
new StopDataFrameTransformRequest(transformId, Boolean.TRUE, null), RequestOptions.DEFAULT);
@ -152,6 +152,7 @@ public class DataFrameTransformIT extends ESRestHighLevelClientTestCase {
}
transformsToClean = new ArrayList<>();
waitForPendingTasks(adminClient());
}
public void testCreateDelete() throws IOException {

View File

@ -74,7 +74,7 @@ public class DataFrameTransformDocumentationIT extends ESRestHighLevelClientTest
private List<String> transformsToClean = new ArrayList<>();
@After
public void cleanUpTransforms() throws IOException {
public void cleanUpTransforms() throws Exception {
for (String transformId : transformsToClean) {
highLevelClient().dataFrame().stopDataFrameTransform(
new StopDataFrameTransformRequest(transformId, Boolean.TRUE, TimeValue.timeValueSeconds(20)), RequestOptions.DEFAULT);
@ -86,6 +86,7 @@ public class DataFrameTransformDocumentationIT extends ESRestHighLevelClientTest
}
transformsToClean = new ArrayList<>();
waitForPendingTasks(adminClient());
}
private void createIndex(String indexName) throws IOException {