diff --git a/.gitignore b/.gitignore
index 2fdf2a1fde32f7f143e8d2f54ee5dbfb416e9704..78079a17a81797c4da9cfd295759a7c3c510b256 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,6 +23,7 @@
hs_err_pid*
.idea/
+*.iml
target/
bin/
diff --git a/NOTICE b/NOTICE
index 231c7243af8d0272c4851a75f3941d595eed4b2a..c936cb140ca3686a24bd3302ce67f2a88b2a4b13 100644
--- a/NOTICE
+++ b/NOTICE
@@ -223,6 +223,7 @@ The following software have components provided under the terms of this license:
- Apache Log4j API (from )
- Apache Log4j Core (from )
- Apache Log4j JUL Adapter (from )
+- Apache Log4j SLF4J Binding (from )
- Apache Log4j to SLF4J Adapter (from )
- AssertJ fluent assertions (from )
- Asynchronous Http Client (from )
@@ -338,9 +339,9 @@ The following software have components provided under the terms of this license:
- Microsoft Application Insights Java SDK Spring Boot starter (from https://github.com/Microsoft/ApplicationInsights-Java)
- Microsoft Application Insights Java SDK Web Module (from https://github.com/Microsoft/ApplicationInsights-Java)
- Microsoft Application Insights Log4j 2 Appender (from https://github.com/Microsoft/ApplicationInsights-Java)
-- Mockito (from http://www.mockito.org)
- Mockito (from http://mockito.org)
- Mockito (from http://www.mockito.org)
+- Mockito (from http://www.mockito.org)
- Mockito (from http://mockito.org)
- Netty Reactive Streams Implementation (from )
- Netty/Buffer (from http://netty.io/)
diff --git a/provider/search-azure/pom.xml b/provider/search-azure/pom.xml
index 058ec932bff547298a34c167118dee797288c613..4a24f8cd11c34e616b99f972d4282a68489b2c2e 100644
--- a/provider/search-azure/pom.xml
+++ b/provider/search-azure/pom.xml
@@ -58,7 +58,7 @@
org.opengroup.osdu
core-lib-azure
- 0.0.9
+ 0.0.12
org.powermock
diff --git a/provider/search-azure/src/main/java/org/opengroup/osdu/search/provider/azure/provider/impl/QueryServiceImpl.java b/provider/search-azure/src/main/java/org/opengroup/osdu/search/provider/azure/provider/impl/QueryServiceImpl.java
index 9c2e8b7722169cc30cdadd9b772c632ec6af1ea3..5e2f32f26d5b0b879d360db8af4af46637e53ee5 100644
--- a/provider/search-azure/src/main/java/org/opengroup/osdu/search/provider/azure/provider/impl/QueryServiceImpl.java
+++ b/provider/search-azure/src/main/java/org/opengroup/osdu/search/provider/azure/provider/impl/QueryServiceImpl.java
@@ -57,7 +57,7 @@ public class QueryServiceImpl extends QueryBase implements IQueryService {
@Override
public QueryResponse queryIndex(QueryRequest searchRequest, ClusterSettings clusterSettings) throws Exception {
try (RestHighLevelClient client = elasticClientHandler.createRestClient(clusterSettings)) {
- QueryResponse queryResponse = executeQuery(searchRequest, client);
+ QueryResponse queryResponse = this.executeQuery(searchRequest, client);
return queryResponse;
}
}
diff --git a/testing/integration-tests/search-test-core/src/main/java/org/opengroup/osdu/util/Config.java b/testing/integration-tests/search-test-core/src/main/java/org/opengroup/osdu/util/Config.java
index b023a8ab969306450cc7bfe03d8b067ec1fa8e0c..b608ccf6e8e75b2ce8e879a30132ca2ac2844d25 100644
--- a/testing/integration-tests/search-test-core/src/main/java/org/opengroup/osdu/util/Config.java
+++ b/testing/integration-tests/search-test-core/src/main/java/org/opengroup/osdu/util/Config.java
@@ -6,6 +6,7 @@ public class Config {
private static final String DEFAULT_ELASTIC_USER_NAME = "";
private static final String DEFAULT_ELASTIC_PASSWORD = "";
private static final String DEFAULT_ELASTIC_PORT = "9243";
+ private static final String DEFAULT_ELASTIC_SSL_ENABLED = "true";
private static final String DEFAULT_INDEXER_HOST = "";
private static final String DEFAULT_SEARCH_HOST = "";
@@ -59,6 +60,10 @@ public class Config {
return getEnvironmentVariableOrDefaultValue("ELASTIC_HOST", DEFAULT_ELASTIC_HOST);
}
+ public static boolean isElasticSslEnabled() {
+ return Boolean.parseBoolean(getEnvironmentVariableOrDefaultValue("ELASTIC_SSL_ENABLED", DEFAULT_ELASTIC_SSL_ENABLED));
+ }
+
public static int getElasticPort() {
return Integer.parseInt(getEnvironmentVariableOrDefaultValue("ELASTIC_PORT", DEFAULT_ELASTIC_PORT));
}
diff --git a/testing/integration-tests/search-test-core/src/main/java/org/opengroup/osdu/util/ElasticUtils.java b/testing/integration-tests/search-test-core/src/main/java/org/opengroup/osdu/util/ElasticUtils.java
index 5208867dafa0a38c8858d96c684d871192047621..9eee18190d5e74a298fc5d7e026d8f7992577573 100644
--- a/testing/integration-tests/search-test-core/src/main/java/org/opengroup/osdu/util/ElasticUtils.java
+++ b/testing/integration-tests/search-test-core/src/main/java/org/opengroup/osdu/util/ElasticUtils.java
@@ -55,11 +55,13 @@ public class ElasticUtils {
private final String username;
private final String password;
private final String host;
+ private final boolean sslEnabled;
public ElasticUtils() {
this.username = Config.getUserName();
this.password = Config.getPassword();
this.host = Config.getElasticHost();
+ this.sslEnabled = Config.isElasticSslEnabled();
}
public void createIndex(String index, String mapping) {
@@ -274,7 +276,8 @@ public class ElasticUtils {
}
public RestClientBuilder createClientBuilder(String host, String usernameAndPassword, int port) {
- RestClientBuilder builder = RestClient.builder(new HttpHost(host, port, "https"));
+ String scheme = this.sslEnabled ? "https" : "http";
+ RestClientBuilder builder = RestClient.builder(new HttpHost(host, port, scheme));
builder.setRequestConfigCallback(requestConfigBuilder -> requestConfigBuilder.setConnectTimeout(REST_CLIENT_CONNECT_TIMEOUT)
.setSocketTimeout(REST_CLIENT_SOCKET_TIMEOUT));
builder.setMaxRetryTimeoutMillis(REST_CLIENT_RETRY_TIMEOUT);