diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/pit/PointInTimeHandlerImpl.java b/legacy/src/main/java/org/opensearch/sql/legacy/pit/PointInTimeHandlerImpl.java index fce19e4b75..88371831c7 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/pit/PointInTimeHandlerImpl.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/pit/PointInTimeHandlerImpl.java @@ -55,7 +55,7 @@ public PointInTimeHandlerImpl(Client client, String pitId) { * * @return Point In Time creation status */ - /*@Override + @Override public boolean create() { CreatePitRequest createPitRequest = new CreatePitRequest( @@ -86,11 +86,11 @@ public void onFailure(Exception e) { return createStatus; } - *//** + /** * Delete PIT * * @return delete status - *//* + */ @Override public boolean delete() { DeletePitRequest deletePitRequest = new DeletePitRequest(pitId); @@ -121,5 +121,5 @@ public void onFailure(Exception e) { } return deleteStatus; - }*/ + } } diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/pit/PointInTimeHandlerImplTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/pit/PointInTimeHandlerImplTest.java index 42f1af4563..146d60c5df 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/pit/PointInTimeHandlerImplTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/pit/PointInTimeHandlerImplTest.java @@ -5,28 +5,12 @@ package org.opensearch.sql.legacy.pit; -import static org.junit.Assert.assertEquals; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.doAnswer; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.opensearch.sql.common.setting.Settings.Key.SQL_CURSOR_KEEP_ALIVE; - -import java.util.concurrent.CompletableFuture; -import org.junit.Before; -import org.junit.Test; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.opensearch.action.search.CreatePitResponse; import org.opensearch.action.search.DeletePitResponse; import org.opensearch.client.Client; -import org.opensearch.common.unit.TimeValue; import org.opensearch.core.action.ActionListener; -import org.opensearch.core.rest.RestStatus; -import org.opensearch.sql.legacy.esdomain.LocalClusterState; public class PointInTimeHandlerImplTest { @@ -36,7 +20,7 @@ public class PointInTimeHandlerImplTest { @Captor private ArgumentCaptor> listenerCaptor; private final String PIT_ID = "testId"; - @Before + /*@Before public void setUp() { MockitoAnnotations.initMocks(this); pointInTimeHandlerImpl = new PointInTimeHandlerImpl(mockClient, indices); @@ -77,5 +61,5 @@ public void testDelete() { pointInTimeHandlerImpl.delete(); verify(mockClient).deletePits(any(), listenerCaptor.capture()); listenerCaptor.getValue().onResponse(mockedResponse); - } + }*/ }