Skip to content

Commit

Permalink
spotless apply
Browse files Browse the repository at this point in the history
Signed-off-by: Yaliang Wu <ylwu@amazon.com>
  • Loading branch information
ylwu-amzn committed Jun 14, 2024
1 parent 4eb5ad5 commit 832dde9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ private void initMasterKey() {
log.info("ML encryption master key initialized successfully");
latch.countDown();
}, e -> {

if (ExceptionUtils.getRootCause(e) instanceof VersionConflictEngineException) {
GetRequest getMasterKeyRequest = new GetRequest(ML_CONFIG_INDEX).id(MASTER_KEY);
try (ThreadContext.StoredContext threadContext = client.threadPool().getThreadContext().stashContext()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ public void encrypt_NonExistingMasterKey_FailedToCreateNewKey_VersionConflict_Nu
doAnswer(invocation -> {
ActionListener<IndexResponse> actionListener = (ActionListener) invocation.getArgument(1);
actionListener
.onFailure(new VersionConflictEngineException(new ShardId(ML_CONFIG_INDEX, "index_uuid", 1), "test_id", "failed"));
.onFailure(new VersionConflictEngineException(new ShardId(ML_CONFIG_INDEX, "index_uuid", 1), "test_id", "failed"));
return null;
}).when(client).index(any(), any());

Expand Down Expand Up @@ -306,7 +306,7 @@ public void encrypt_NonExistingMasterKey_FailedToCreateNewKey_VersionConflict_Nu
doAnswer(invocation -> {
ActionListener<IndexResponse> actionListener = (ActionListener) invocation.getArgument(1);
actionListener
.onFailure(new VersionConflictEngineException(new ShardId(ML_CONFIG_INDEX, "index_uuid", 1), "test_id", "failed"));
.onFailure(new VersionConflictEngineException(new ShardId(ML_CONFIG_INDEX, "index_uuid", 1), "test_id", "failed"));
return null;
}).when(client).index(any(), any());

Expand Down

0 comments on commit 832dde9

Please sign in to comment.