Skip to content

Commit

Permalink
Bump Mockito dependencies (#1711)
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
  • Loading branch information
reta committed Jan 15, 2024
1 parent 0d639f2 commit dec09d4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package org.opensearch.ml.bwc;

import static org.hamcrest.Matchers.equalTo;
import static org.opensearch.commons.ConfigConstants.OPENSEARCH_SECURITY_SSL_HTTP_ENABLED;
import static org.opensearch.commons.ConfigConstants.OPENSEARCH_SECURITY_SSL_HTTP_KEYSTORE_FILEPATH;
import static org.opensearch.commons.ConfigConstants.OPENSEARCH_SECURITY_SSL_HTTP_KEYSTORE_KEYPASSWORD;
Expand Down Expand Up @@ -735,7 +736,7 @@ public String getTaskState(String taskId) throws IOException {
return (String) task.get("state");
}

public void waitForTask(String taskId, MLTaskState targetState) throws InterruptedException {
public void waitForTask(String taskId, MLTaskState targetState) throws InterruptedException, IOException {
AtomicBoolean taskDone = new AtomicBoolean(false);
waitUntil(() -> {
try {
Expand All @@ -748,6 +749,7 @@ public void waitForTask(String taskId, MLTaskState targetState) throws Interrupt
}
return taskDone.get();
}, CUSTOM_MODEL_TIMEOUT, TimeUnit.SECONDS);
assertThat(getTaskState(taskId), equalTo(targetState.name()));
assertTrue(taskDone.get());
}
}

0 comments on commit dec09d4

Please sign in to comment.