From e558ceacbca72e797fac028ca7e732fe138bea2e Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Tue, 21 Jun 2022 14:50:51 -0400 Subject: [PATCH] Addressing code review comments Signed-off-by: Andriy Redko --- .../action/search/AbstractSearchAsyncActionTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/test/java/org/opensearch/action/search/AbstractSearchAsyncActionTests.java b/server/src/test/java/org/opensearch/action/search/AbstractSearchAsyncActionTests.java index fa15df58666ac..b44b59b8a4ad5 100644 --- a/server/src/test/java/org/opensearch/action/search/AbstractSearchAsyncActionTests.java +++ b/server/src/test/java/org/opensearch/action/search/AbstractSearchAsyncActionTests.java @@ -407,7 +407,7 @@ public void onResponse(SearchResponse response) { public void onFailure(Exception e) { if (fail.compareAndExchange(true, false)) { try { - throw new NullPointerException("Simulated exception"); + throw new RuntimeException("Simulated exception"); } finally { executor.submit(() -> latch.countDown()); } @@ -451,7 +451,7 @@ public void testOnShardSuccessPhaseDoneFailure() throws InterruptedException { @Override public void onResponse(SearchResponse response) { if (fail.compareAndExchange(true, false)) { - throw new NullPointerException("Simulated exception"); + throw new RuntimeException("Simulated exception"); } }