From 7f84bb086349d9e431b1142c5a27ca6e5828f665 Mon Sep 17 00:00:00 2001 From: Yong Sheng Tan Date: Tue, 24 Dec 2024 14:22:12 +0800 Subject: [PATCH] Fix spotless apply --- .../os/dao/index/OpenSearchRestDaoBaseTest.java | 5 ++--- .../conductor/os/dao/index/OpenSearchTest.java | 11 +++++++---- .../os/dao/index/TestBulkRequestBuilderWrapper.java | 4 ++-- 3 files changed, 11 insertions(+), 9 deletions(-) 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);