Skip to content

Commit

Permalink
Bump Mockito dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <[email protected]>
  • Loading branch information
reta committed Dec 7, 2023
1 parent d71c77f commit 2d93d30
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies {
implementation project(':opensearch-ml-common')
compileOnly group: 'org.opensearch', name: 'opensearch', version: "${opensearch_version}"
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.3.1'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.7.0'

}

Expand Down
2 changes: 1 addition & 1 deletion common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
compileOnly "org.opensearch.client:opensearch-rest-client:${opensearch_version}"
compileOnly "org.opensearch:common-utils:${common_utils_version}"
testImplementation group: 'org.mockito', name: 'mockito-core', version: '4.4.0'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.7.0'

compileOnly group: 'org.apache.commons', name: 'commons-text', version: '1.10.0'
compileOnly group: 'com.google.code.gson', name: 'gson', version: '2.10.1'
Expand Down
2 changes: 1 addition & 1 deletion memory/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies {
exclude module : 'hamcrest'
exclude module : 'hamcrest-core'
}
testImplementation group: 'org.mockito', name: 'mockito-core', version: '4.4.0'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.7.0'
testImplementation "org.opensearch.test:framework:${opensearch_version}"
testImplementation "org.opensearch.client:opensearch-rest-client:${opensearch_version}"
testImplementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1'
Expand Down
2 changes: 1 addition & 1 deletion ml-algorithms/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dependencies {
implementation group: 'io.protostuff', name: 'protostuff-api', version: '1.8.0'
implementation group: 'io.protostuff', name: 'protostuff-collectionschema', version: '1.8.0'
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.3.1'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.7.0'
implementation group: 'com.google.guava', name: 'guava', version: '32.0.1-jre'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1'
implementation platform("ai.djl:bom:0.21.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import static org.opensearch.ml.stats.MLNodeLevelStat.ML_REQUEST_COUNT;
import static org.opensearch.ml.utils.TestData.SENTENCE_TRANSFORMER_MODEL_URL;
import static org.opensearch.ml.utils.TestData.trainModelDataJson;
import static org.hamcrest.Matchers.equalTo;

import java.io.IOException;
import java.net.URI;
Expand Down Expand Up @@ -750,7 +751,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 @@ -763,6 +764,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 2d93d30

Please sign in to comment.