Skip to content

Commit

Permalink
fix UTs
Browse files Browse the repository at this point in the history
Signed-off-by: Jing Zhang <[email protected]>
  • Loading branch information
jngz-es committed Oct 28, 2024
1 parent e51d00e commit d424ff0
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,8 @@ public void decrypt() {

@Test
public void encrypt_NullMasterKey_NullMasterKey_MasterKeyNotExistInIndex() {
exceptionRule.expect(ResourceNotFoundException.class);
exceptionRule.expectMessage(MASTER_KEY_NOT_READY_ERROR);
exceptionRule.expect(MLException.class);
exceptionRule.expectMessage("Fetching master key timed out.");

doAnswer(invocation -> {
ActionListener<GetResponse> listener = invocation.getArgument(1);
Expand Down Expand Up @@ -517,8 +517,8 @@ public void decrypt_NoResponseToInitConfigIndex() {

@Test
public void decrypt_MLConfigIndexNotFound() {
exceptionRule.expect(ResourceNotFoundException.class);
exceptionRule.expectMessage(MASTER_KEY_NOT_READY_ERROR);
exceptionRule.expect(MLException.class);
exceptionRule.expectMessage("Fetching master key timed out.");

Metadata metadata = new Metadata.Builder().indices(ImmutableMap.of()).build();
when(clusterState.metadata()).thenReturn(metadata);
Expand Down

0 comments on commit d424ff0

Please sign in to comment.