Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
afoucret committed Nov 17, 2023
1 parent 68339f6 commit 84e6fae
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ public void testLoadLearnToRankConfig() throws Exception {
);
ActionListener<LearnToRankConfig> listener = mock(ActionListener.class);
learnToRankService.loadLearnToRankConfig(GOOD_MODEL, Collections.emptyMap(), listener);
assertBusy(() -> {
verify(listener).onResponse(eq((LearnToRankConfig) GOOD_MODEL_CONFIG.getInferenceConfig()));
});
assertBusy(() -> { verify(listener).onResponse(eq((LearnToRankConfig) GOOD_MODEL_CONFIG.getInferenceConfig())); });
}

@SuppressWarnings("unchecked")
Expand All @@ -93,9 +91,7 @@ public void testLoadMissingLearnToRankConfig() throws Exception {
);
ActionListener<LearnToRankConfig> listener = mock(ActionListener.class);
learnToRankService.loadLearnToRankConfig("non-existing-model", Collections.emptyMap(), listener);
assertBusy(() -> {
verify(listener).onFailure(isA(ResourceNotFoundException.class));
});
assertBusy(() -> { verify(listener).onFailure(isA(ResourceNotFoundException.class)); });
}

@SuppressWarnings("unchecked")
Expand All @@ -108,9 +104,7 @@ public void testLoadBadLearnToRankConfig() throws Exception {
);
ActionListener<LearnToRankConfig> listener = mock(ActionListener.class);
learnToRankService.loadLearnToRankConfig(BAD_MODEL, Collections.emptyMap(), listener);
assertBusy(() -> {
verify(listener).onFailure(isA(ElasticsearchStatusException.class));
});
assertBusy(() -> { verify(listener).onFailure(isA(ElasticsearchStatusException.class)); });
}

public void testLoadLearnToRankConfigWithTemplate() {
Expand Down

0 comments on commit 84e6fae

Please sign in to comment.