Skip to content
Snippets Groups Projects
Commit a79f96a4 authored by Artem Dobrynin (EPAM)'s avatar Artem Dobrynin (EPAM)
Browse files

GONRG-744: Move search.Config out of os-core-common. Search, Indexer, Indexer-Queue [publish]

https://jiraeu.epam.com/browse/GONRG-744

* Fixed values from os-core-lib-gcp
* Fixed some tests
parent 92b4d08d
No related branches found
No related tags found
1 merge request!54Move Search Config out of os-core-common (GONRG-744)
......@@ -31,6 +31,10 @@ gae-service=indexer
key-ring=csqp
kms-key=searchService
KEY_RING=${key-ring}
KMS_KEY=${kms-key}
GOOGLE_CLOUD_PROJECT=${google-cloud-project}
elastic-datastore-kind=SearchSettings
elastic-datastore-id=indexer-service
......
......@@ -26,10 +26,10 @@ import org.opengroup.osdu.core.common.model.search.IndexInfo;
import org.opengroup.osdu.core.common.logging.JaxRsDpsLog;
import org.opengroup.osdu.core.common.provider.interfaces.IRequestInfo;
import org.opengroup.osdu.core.common.search.IndicesService;
import org.opengroup.osdu.indexer.config.IndexerConfigurationProperties;
import org.opengroup.osdu.indexer.util.ElasticClientHandler;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.util.ReflectionTestUtils;
import java.io.IOException;
import java.time.Instant;
......@@ -49,6 +49,8 @@ public class CronServiceImplTest {
@Mock
private ElasticClientHandler elasticClientHandler;
@Mock
private IndexerConfigurationProperties configurationProperties;
@Mock
private IRequestInfo requestInfo;
@Mock
private JaxRsDpsLog log;
......@@ -63,8 +65,8 @@ public class CronServiceImplTest {
when(this.requestInfo.getHeaders()).thenReturn(dpsHeaders);
ReflectionTestUtils.setField(this.sut, "CRON_INDEX_CLEANUP_THRESHOLD_DAYS", "3");
ReflectionTestUtils.setField(this.sut, "CRON_EMPTY_INDEX_CLEANUP_THRESHOLD_DAYS", "7");
when(configurationProperties.getCronIndexCleanupThresholdDays()).thenReturn(3);
when(configurationProperties.getCronEmptyIndexCleanupThresholdDays()).thenReturn(3);
}
@Test
......
......@@ -36,9 +36,9 @@ import org.opengroup.osdu.core.common.http.IUrlFetchService;
import org.opengroup.osdu.core.common.model.indexer.RecordQueryResponse;
import org.opengroup.osdu.core.common.model.indexer.RecordReindexRequest;
import org.opengroup.osdu.core.common.model.indexer.Records;
import org.opengroup.osdu.indexer.config.IndexerConfigurationProperties;
import org.springframework.http.HttpStatus;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.util.ReflectionTestUtils;
import java.lang.reflect.Type;
import java.net.URISyntaxException;
......@@ -64,6 +64,8 @@ public class StorageServiceTest {
private JaxRsDpsLog log;
@Mock
private IRequestInfo requestInfo;
@Mock
private IndexerConfigurationProperties configurationProperties;
@InjectMocks
private StorageServiceImpl sut;
......@@ -86,7 +88,7 @@ public class StorageServiceTest {
jobStatus.initialize(msgs);
ids = Arrays.asList(RECORD_ID1, RECORDS_ID2);
ReflectionTestUtils.setField(this.sut, "STORAGE_RECORDS_BATCH_SIZE", "20");
when(configurationProperties.getStorageRecordsBatchSize()).thenReturn(20);
}
@Test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment