Commit 37022934 authored by Aalekh Jain's avatar Aalekh Jain
Browse files

Fixes for UTs failure after codebase changes

parent 82d82eef
Pipeline #27699 passed with stages
in 43 minutes and 44 seconds
......@@ -30,6 +30,7 @@ import org.opengroup.osdu.core.common.model.search.QueryResponse;
import org.opengroup.osdu.core.common.model.tenant.TenantInfo;
import org.opengroup.osdu.core.common.provider.interfaces.IElasticRepository;
import org.opengroup.osdu.core.common.provider.interfaces.ITenantFactory;
import org.opengroup.osdu.search.config.SearchConfigurationProperties;
import org.opengroup.osdu.search.provider.interfaces.IQueryService;
import java.util.*;
......@@ -74,6 +75,9 @@ public class CcsQueryServiceImplTest {
@Mock
private IElasticRepository elasticRepository;
@Mock
private SearchConfigurationProperties configurationProperties;
@InjectMocks
CcsQueryServiceImpl sut;
......@@ -149,7 +153,6 @@ public class CcsQueryServiceImplTest {
doReturn(clusterSettings1).when(elasticRepository).getElasticClusterSettings(eq(tenant1));
doReturn(clusterSettings2).when(elasticRepository).getElasticClusterSettings(eq(tenant2));
doReturn(queryResponse1).doReturn(queryResponse2).when(queryService).queryIndex(any(), any());
CcsQueryResponse ccsQueryResponse = sut.makeRequest(ccsQueryRequest);
ArgumentCaptor<QueryRequest> searchRequestArgCaptor = ArgumentCaptor.forClass(QueryRequest.class);
......
......@@ -29,7 +29,9 @@ import org.opengroup.osdu.core.common.model.entitlements.GroupInfo;
import org.opengroup.osdu.core.common.model.entitlements.Groups;
import org.opengroup.osdu.core.common.model.http.AppException;
import org.opengroup.osdu.core.common.model.http.DpsHeaders;
import org.opengroup.osdu.search.provider.azure.cache.GroupCache;
import javax.inject.Inject;
import java.util.*;
import static org.junit.Assert.assertEquals;
......@@ -52,7 +54,7 @@ public class EntitlementsAndCacheServiceImplTest {
private DpsHeaders dpsHeaders;
@Mock
private ICache<String, Groups> cache;
private GroupCache cache;
@Mock
private IEntitlementsFactory factory;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment