diff --git a/os-persistence/src/test/java/com/netflix/conductor/os/dao/index/OpenSearchRestDaoBaseTest.java b/os-persistence/src/test/java/com/netflix/conductor/os/dao/index/OpenSearchRestDaoBaseTest.java index 8e17b97be..b7bb57a65 100644 --- a/os-persistence/src/test/java/com/netflix/conductor/os/dao/index/OpenSearchRestDaoBaseTest.java +++ b/os-persistence/src/test/java/com/netflix/conductor/os/dao/index/OpenSearchRestDaoBaseTest.java @@ -16,15 +16,14 @@ import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; -import java.util.regex.Pattern; import org.apache.http.HttpHost; +import org.junit.After; +import org.junit.Before; import org.opensearch.client.Request; import org.opensearch.client.Response; import org.opensearch.client.RestClient; import org.opensearch.client.RestClientBuilder; -import org.junit.After; -import org.junit.Before; import org.springframework.retry.support.RetryTemplate; public abstract class OpenSearchRestDaoBaseTest extends OpenSearchTest { diff --git a/os-persistence/src/test/java/com/netflix/conductor/os/dao/index/OpenSearchTest.java b/os-persistence/src/test/java/com/netflix/conductor/os/dao/index/OpenSearchTest.java index 980b7a496..a296d279b 100644 --- a/os-persistence/src/test/java/com/netflix/conductor/os/dao/index/OpenSearchTest.java +++ b/os-persistence/src/test/java/com/netflix/conductor/os/dao/index/OpenSearchTest.java @@ -12,22 +12,22 @@ */ package com.netflix.conductor.os.dao.index; -import com.netflix.conductor.os.config.OpenSearchProperties; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.runner.RunWith; +import org.opensearch.testcontainers.OpensearchContainer; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit4.SpringRunner; -import org.opensearch.testcontainers.OpensearchContainer; +import org.testcontainers.utility.DockerImageName; import com.netflix.conductor.common.config.TestObjectMapperConfiguration; +import com.netflix.conductor.os.config.OpenSearchProperties; import com.fasterxml.jackson.databind.ObjectMapper; -import org.testcontainers.utility.DockerImageName; @ContextConfiguration( classes = {TestObjectMapperConfiguration.class, OpenSearchTest.TestConfiguration.class}) @@ -46,7 +46,10 @@ public OpenSearchProperties elasticSearchProperties() { } protected static OpensearchContainer container = - new OpensearchContainer<>(DockerImageName.parse("opensearchproject/opensearch:2.18.0")); // this should match the client version + new OpensearchContainer<>( + DockerImageName.parse( + "opensearchproject/opensearch:2.18.0")); // this should match the client + // version @Autowired protected ObjectMapper objectMapper; diff --git a/os-persistence/src/test/java/com/netflix/conductor/os/dao/index/TestBulkRequestBuilderWrapper.java b/os-persistence/src/test/java/com/netflix/conductor/os/dao/index/TestBulkRequestBuilderWrapper.java index 617d3616f..9208cb509 100644 --- a/os-persistence/src/test/java/com/netflix/conductor/os/dao/index/TestBulkRequestBuilderWrapper.java +++ b/os-persistence/src/test/java/com/netflix/conductor/os/dao/index/TestBulkRequestBuilderWrapper.java @@ -12,11 +12,11 @@ */ package com.netflix.conductor.os.dao.index; +import org.junit.Test; +import org.mockito.Mockito; import org.opensearch.action.bulk.BulkRequestBuilder; import org.opensearch.action.index.IndexRequest; import org.opensearch.action.update.UpdateRequest; -import org.junit.Test; -import org.mockito.Mockito; public class TestBulkRequestBuilderWrapper { BulkRequestBuilder builder = Mockito.mock(BulkRequestBuilder.class);