Skip to content

Commit

Permalink
Merge pull request conductor-oss#347 from ubisoft/feature/add-opensearch
Browse files Browse the repository at this point in the history
Fix Spotless on os-persistence
  • Loading branch information
v1r3n authored Jan 2, 2025
2 parents 4f8f845 + bc7551e commit 5ef888a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand All @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
15 changes: 7 additions & 8 deletions server/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ loadSample=true
conductor.db.type=memory
conductor.queue.type=redis_standalone

conductor.indexing.enabled=true
conductor.indexing.enabled=false

#Redis configuration details.
#format is host:port:rack separated by semicolon
Expand Down Expand Up @@ -49,18 +49,17 @@ conductor.redis.availabilityZone=us-east-1c
#conductor.redis.timeBetweenEvictionRunsMillis = -1L
#conductor.redis.testWhileIdle = false
#conductor.redis.numTestsPerEvictionRun = 3
conductor.indexing.type=opensearch

#Transport address to elasticsearch
conductor.indexing.url=localhost:9200
conductor.elasticsearch.url=localhost:9300

#Name of the elasticsearch cluster
conductor.indexing.indexName=conductor

conductor.elasticsearch.indexName=conductor

#Elasticsearch major release version.
#conductor.indexing.version=es7
conductor.elasticsearch.version=0
conductor.elasticsearch.clusterHealthColor=yellow
conductor.elasticsearch.version=7
#conductor.elasticsearch.version=7

# Default event queue type to listen on for wait task
conductor.default-event-queue.type=sqs

Expand Down

0 comments on commit 5ef888a

Please sign in to comment.