diff --git a/spi/src/test/java/org/opensearch/jobscheduler/spi/utils/LockServiceIT.java b/spi/src/test/java/org/opensearch/jobscheduler/spi/utils/LockServiceIT.java index e52ba488..c926c657 100644 --- a/spi/src/test/java/org/opensearch/jobscheduler/spi/utils/LockServiceIT.java +++ b/spi/src/test/java/org/opensearch/jobscheduler/spi/utils/LockServiceIT.java @@ -11,7 +11,7 @@ import org.junit.Before; import org.junit.Ignore; import org.mockito.Mockito; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.cluster.service.ClusterService; import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.jobscheduler.spi.JobDocVersion; @@ -81,7 +81,8 @@ public Long getLockDurationSeconds() { @Before public void setup() { - // the test cluster is an external cluster instead of internal cluster in new test framework, + // the test cluster is an external cluster instead of internal cluster in new + // test framework, // thus the OpenSearchIntegTestCase.clusterService() will throw exception. this.clusterService = Mockito.mock(ClusterService.class, Mockito.RETURNS_DEEP_STUBS); Mockito.when(this.clusterService.state().routingTable().hasIndex(".opendistro-job-scheduler-lock")) @@ -454,7 +455,8 @@ public void testRenewLock() throws Exception { lockService.acquireLockWithId(context.getJobIndexName(), LOCK_DURATION_SECONDS, lockID, ActionListener.wrap(lock -> { assertNotNull("Expected to successfully grab lock", lock); - // Set the time of LockService (the 'lockTime' of acquired locks) to a fixed time. + // Set the time of LockService (the 'lockTime' of acquired locks) to a fixed + // time. Instant now = Instant.now(); lockService.setTime(now); lockService.renewLock(lock, ActionListener.wrap(renewedLock -> {