Reenable spring-boot2 in aai-common 71/103471/2
authorJimmy Forsyth <jf2512@att.com>
Tue, 10 Mar 2020 19:21:02 +0000 (15:21 -0400)
committerJimmy Forsyth <jf2512@att.com>
Tue, 10 Mar 2020 20:34:50 +0000 (16:34 -0400)
Issue-ID: AAI-2831
Signed-off-by: Jimmy Forsyth <jf2512@att.com>
Change-Id: I9f3f1d8d1d9ef45786d0f17afa5c824e90c77263

30 files changed:
aai-aaf-auth/pom.xml
aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafAuthorizationFilter.java
aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafCertAuthorizationFilter.java
aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafCertFilter.java
aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/AafFilter.java
aai-aaf-auth/src/main/java/org/onap/aai/aaf/filters/TwoWaySslAuthorization.java
aai-annotations/pom.xml
aai-auth/pom.xml
aai-common-docker/aai-common-images/pom.xml
aai-common-docker/aai-haproxy-image/pom.xml
aai-common-docker/pom.xml
aai-core/pom.xml
aai-core/src/main/java/org/onap/aai/prevalidation/ValidationServiceNoAuthClient.java
aai-core/src/main/java/org/onap/aai/restcore/util/URITools.java
aai-els-onap-logging/pom.xml
aai-parent/pom.xml
aai-rest/pom.xml
aai-rest/src/main/java/org/onap/aai/restclient/NoAuthRestClient.java
aai-rest/src/main/java/org/onap/aai/restclient/OneWaySSLRestClient.java
aai-rest/src/main/java/org/onap/aai/restclient/TwoWaySSLRestClient.java
aai-schema-abstraction/pom.xml
aai-schema-abstraction/src/test/java/org/onap/aai/schemaif/oxm/OxmSchemaProviderTest.java
aai-schema-ingest/pom.xml
aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorTest.java
aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorTest.java
aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterWithPropFileTest.java
aai-schema-ingest/src/test/resources/forWiringTests/testUsingPropFileContext.xml
aai-utils/pom.xml
pom.xml
version.properties

index 580f56e..1557fbf 100644 (file)
@@ -6,7 +6,7 @@
     <parent>
         <groupId>org.onap.aai.aai-common</groupId>
         <artifactId>aai-parent</artifactId>
-        <version>1.6.10-SNAPSHOT</version>
+        <version>1.6.11-SNAPSHOT</version>
         <relativePath>../aai-parent/pom.xml</relativePath>
     </parent>
     <artifactId>aai-aaf-auth</artifactId>
index 4628539..82651e9 100644 (file)
@@ -23,7 +23,7 @@ package org.onap.aai.aaf.filters;
 import org.onap.aai.aaf.auth.ResponseFormatter;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.web.filter.OrderedRequestContextFilter;
+import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter;
 import org.springframework.context.annotation.Profile;
 import org.springframework.context.annotation.PropertySource;
 import org.springframework.stereotype.Component;
index 7ec6bb6..e0adf19 100644 (file)
@@ -23,7 +23,7 @@ package org.onap.aai.aaf.filters;
 import org.onap.aai.aaf.auth.AafRequestFilter;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.web.filter.OrderedRequestContextFilter;
+import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter;
 import org.springframework.context.annotation.Profile;
 import org.springframework.context.annotation.PropertySource;
 import org.springframework.stereotype.Component;
index 71238cf..7a47b97 100644 (file)
@@ -27,7 +27,7 @@ import org.onap.aaf.cadi.filter.CadiFilter;
 import org.onap.aai.aaf.auth.AafRequestFilter;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.web.filter.OrderedRequestContextFilter;
+import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter;
 import org.springframework.context.annotation.Profile;
 import org.springframework.context.annotation.PropertySource;
 import org.springframework.stereotype.Component;
index 16d9afd..e6769dd 100644 (file)
@@ -26,7 +26,7 @@ import org.onap.aaf.cadi.PropAccess;
 import org.onap.aaf.cadi.filter.CadiFilter;
 import org.onap.aai.aaf.auth.ResponseFormatter;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.web.filter.OrderedRequestContextFilter;
+import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter;
 import org.springframework.context.annotation.Profile;
 import org.springframework.stereotype.Component;
 
index 0e206c5..150802b 100644 (file)
@@ -26,7 +26,7 @@ import org.onap.aai.aaf.auth.CertUtil;
 import org.onap.aai.aaf.auth.ResponseFormatter;
 import org.onap.aai.exceptions.AAIException;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.web.filter.OrderedRequestContextFilter;
+import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter;
 import org.springframework.context.annotation.Profile;
 import org.springframework.core.env.Environment;
 import org.springframework.stereotype.Component;
index e11c619..e496092 100644 (file)
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.onap.aai.aai-common</groupId>
         <artifactId>aai-parent</artifactId>
-        <version>1.6.10-SNAPSHOT</version>
+        <version>1.6.11-SNAPSHOT</version>
         <relativePath>../aai-parent/pom.xml</relativePath>
     </parent>
     <artifactId>aai-annotations</artifactId>
index 0dbd11a..12529a4 100644 (file)
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.onap.aai.aai-common</groupId>
         <artifactId>aai-parent</artifactId>
-        <version>1.6.10-SNAPSHOT</version>
+        <version>1.6.11-SNAPSHOT</version>
         <relativePath>../aai-parent/pom.xml</relativePath>
     </parent>
     <artifactId>aai-auth</artifactId>
index 31b878b..e2792e9 100644 (file)
     <parent>
         <groupId>org.onap.aai.aai-common</groupId>
         <artifactId>aai-common-docker</artifactId>
-        <version>1.6.10-SNAPSHOT</version>
+        <version>1.6.11-SNAPSHOT</version>
     </parent>
 
     <artifactId>aai-common-images</artifactId>
-    <version>1.6.10-SNAPSHOT</version>
+    <version>1.6.11-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>aai-aai-common-images</name>
     <description>Contains dockerfiles for aai-common images (alpine and ubuntu based).</description>
index d77f7f6..49a1a32 100644 (file)
     <parent>
         <groupId>org.onap.aai.aai-common</groupId>
         <artifactId>aai-common-docker</artifactId>
-        <version>1.6.10-SNAPSHOT</version>
+        <version>1.6.11-SNAPSHOT</version>
     </parent>
 
     <artifactId>aai-haproxy-image</artifactId>
-    <version>1.6.10-SNAPSHOT</version>
+    <version>1.6.11-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>aai-aai-haproxy-image</name>
     <description>Contains dockerfiles for aai-haproxy image.</description>
index 1eec114..900667b 100644 (file)
@@ -26,7 +26,7 @@
     <parent>
         <groupId>org.onap.aai.aai-common</groupId>
         <artifactId>aai-parent</artifactId>
-        <version>1.6.10-SNAPSHOT</version>
+        <version>1.6.11-SNAPSHOT</version>
         <relativePath>../aai-parent/pom.xml</relativePath>
     </parent>
 
index 84fb4dc..6ecc0fb 100644 (file)
@@ -28,7 +28,7 @@ limitations under the License.
        <parent>
                <groupId>org.onap.aai.aai-common</groupId>
                <artifactId>aai-parent</artifactId>
-               <version>1.6.10-SNAPSHOT</version>
+               <version>1.6.11-SNAPSHOT</version>
                <relativePath>../aai-parent/pom.xml</relativePath>
        </parent>
        <artifactId>aai-core</artifactId>
index d373ae7..6173e4b 100644 (file)
@@ -26,6 +26,7 @@ import org.onap.aai.restclient.NoAuthRestClient;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.MediaType;
+import org.springframework.http.client.ClientHttpRequestFactory;
 import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
 import org.springframework.util.MultiValueMap;
 
index a757d3d..fc32f85 100644 (file)
@@ -47,25 +47,21 @@ public class URITools {
         MultivaluedMap<String, String> result = new MultivaluedHashMap<>();
         String queryParams = uri.getRawQuery();
         if (queryParams != null) {
-            try {
-                String[] sections = queryParams.split("&");
-                String[] query = null;
-                String key, value = "";
-                for (String section : sections) {
-                    query = section.split("=");
-                    key = UriUtils.decode(query[0], "UTF-8");
-                    if (query[1] != null) {
-                        query[1] = query[1].replaceAll("\\+", "%20");
-                    }
-                    value = UriUtils.decode(query[1], "UTF-8");
-                    if (result.containsKey(key)) {
-                        result.add(key, value);
-                    } else {
-                        result.putSingle(key, value);
-                    }
+            String[] sections = queryParams.split("&");
+            String[] query = null;
+            String key, value = "";
+            for (String section : sections) {
+                query = section.split("=");
+                key = UriUtils.decode(query[0], "UTF-8");
+                if (query[1] != null) {
+                    query[1] = query[1].replaceAll("\\+", "%20");
+                }
+                value = UriUtils.decode(query[1], "UTF-8");
+                if (result.containsKey(key)) {
+                    result.add(key, value);
+                } else {
+                    result.putSingle(key, value);
                 }
-            } catch (UnsupportedEncodingException e) {
-
             }
         }
         return result;
index 2dcc6f6..d91ac3b 100644 (file)
@@ -6,7 +6,7 @@
     <parent>
         <groupId>org.onap.aai.aai-common</groupId>
         <artifactId>aai-parent</artifactId>
-        <version>1.6.10-SNAPSHOT</version>
+        <version>1.6.11-SNAPSHOT</version>
         <relativePath>../aai-parent/pom.xml</relativePath>
     </parent>
     <artifactId>aai-els-onap-logging</artifactId>
index 1a237e8..0adb000 100644 (file)
@@ -1,33 +1,33 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 
-   ============LICENSE_START======================================================
-   org.onap.aai
-   ===============================================================================
-   Copyright Â© 2019 AT&T Intellectual Property. All rights reserved.
-   ===============================================================================
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
+============LICENSE_START======================================================
+org.onap.aai
+===============================================================================
+Copyright Â© 2019 AT&T Intellectual Property. All rights reserved.
+===============================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
 ===========LICENSE_END=========================================================
 
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.onap.aai.aai-common</groupId>
     <artifactId>aai-common</artifactId>
-    <version>1.6.10-SNAPSHOT</version>
+    <version>1.6.11-SNAPSHOT</version>
   </parent>
   <artifactId>aai-parent</artifactId>
   <name>aai-parent</name>
     <slf4j.version>1.7.25</slf4j.version>
     <log4j.version>1.2.17</log4j.version>
     <mockito.all.version>1.10.19</mockito.all.version>
-    <mockito.core.version>2.15.0</mockito.core.version>
+    <mockito.core.version>1.10.19</mockito.core.version>
     <netty.handler.version>4.1.43.Final</netty.handler.version>
     <netty.version>4.0.56.Final</netty.version>
     <opencsv.version>3.1</opencsv.version>
     <reflections.version>0.9.10</reflections.version>
     <snakeyaml.version>1.25</snakeyaml.version>
 
-    <spring.boot.version>1.5.22.RELEASE</spring.boot.version>
+    <spring.boot.version>2.1.12.RELEASE</spring.boot.version>
     <javax.servlet.version>3.1.0</javax.servlet.version>
     <javax.annotation.version>1.2</javax.annotation.version>
 
-   <sonar.jacoco.reportPath />
+    <sonar.jacoco.reportPath />
     <sonar.jacoco.itReportPath />
     <sonar.jacoco.reportMissing.force.zero />
 
 
     <sonar.scanner.version>3.7.0.1746</sonar.scanner.version>
 
-    <spring.version>4.3.25.RELEASE</spring.version>
-    <spring.jms.version>4.3.25.RELEASE</spring.jms.version>
-    <spring.test.version>4.3.25.RELEASE</spring.test.version>
+    <spring.version>5.1.13.RELEASE</spring.version>
+    <spring.jms.version>5.1.13.RELEASE</spring.jms.version>
+    <spring.test.version>5.1.13.RELEASE</spring.test.version>
     <spring.security.rsa.version>1.0.8.RELEASE</spring.security.rsa.version>
     <json.simple.version>1.1.1</json.simple.version>
     <powermock.api.mockito2.version>2.0.4</powermock.api.mockito2.version>
   <profiles>
     <profile>
       <id>spring-boot-2-1</id>
+      <properties>
+        <spring.boot.version>2.1.12.RELEASE</spring.boot.version>
+      </properties>
+    </profile>
+    <profile>
+      <id>spring-boot-1-5</id>
       <properties>
         <spring.boot.version>1.5.22.RELEASE</spring.boot.version>
       </properties>
index 89d3d3c..d89fe0a 100644 (file)
@@ -29,7 +29,7 @@
     <parent>
         <groupId>org.onap.aai.aai-common</groupId>
         <artifactId>aai-parent</artifactId>
-        <version>1.6.10-SNAPSHOT</version>
+        <version>1.6.11-SNAPSHOT</version>
         <relativePath>../aai-parent/pom.xml</relativePath>
     </parent>
     <artifactId>aai-rest</artifactId>
index 68ff3e5..b11b033 100644 (file)
@@ -26,6 +26,7 @@ import org.apache.http.client.HttpClient;
 import org.apache.http.impl.client.HttpClients;
 import org.onap.aai.aailog.filter.RestClientLoggingInterceptor;
 import org.springframework.boot.web.client.RestTemplateBuilder;
+import org.springframework.http.client.ClientHttpRequestFactory;
 import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
 import org.springframework.web.client.RestTemplate;
 
@@ -39,8 +40,8 @@ public abstract class NoAuthRestClient extends RestClient {
 
     @PostConstruct
     public void init() throws Exception {
-        restTemplate =
-            new RestTemplateBuilder().requestFactory(this.getHttpRequestFactory()).build();
+        restTemplate = new RestTemplate();
+        restTemplate.setRequestFactory(this.getHttpRequestFactory());
         restTemplate.setErrorHandler(new RestClientResponseErrorHandler());
         RestClientLoggingInterceptor loggingInterceptor = new RestClientLoggingInterceptor();
         restTemplate.getInterceptors().add(loggingInterceptor);
index b2534f5..5c359e2 100644 (file)
@@ -42,8 +42,8 @@ public abstract class OneWaySSLRestClient extends RestClient {
 
     @PostConstruct
     public void init() throws Exception {
-        restTemplate =
-            new RestTemplateBuilder().requestFactory(this.getHttpRequestFactory()).build();
+        restTemplate = new RestTemplate();
+        restTemplate.setRequestFactory(this.getHttpRequestFactory());
 
         restTemplate.setErrorHandler(new RestClientResponseErrorHandler());
         RestClientLoggingInterceptor loggingInterceptor = new RestClientLoggingInterceptor();
index 58ee79f..f43d21c 100644 (file)
@@ -48,9 +48,8 @@ public abstract class TwoWaySSLRestClient extends RestClient {
 
     @PostConstruct
     public void init() throws Exception {
-        restTemplate =
-                new RestTemplateBuilder().requestFactory(this.getHttpRequestFactory()).build();
-
+        restTemplate = new RestTemplate();
+        restTemplate.setRequestFactory(this.getHttpRequestFactory());
         restTemplate.setErrorHandler(new RestClientResponseErrorHandler());
         RestClientLoggingInterceptor loggingInterceptor = new RestClientLoggingInterceptor();
         restTemplate.getInterceptors().add(loggingInterceptor);
index 9c0eacd..a0f42de 100644 (file)
@@ -28,7 +28,7 @@
   <parent>
     <groupId>org.onap.aai.aai-common</groupId>
     <artifactId>aai-parent</artifactId>
-    <version>1.6.10-SNAPSHOT</version>
+    <version>1.6.11-SNAPSHOT</version>
     <relativePath>../aai-parent/pom.xml</relativePath>
   </parent>
 
index 6c7364a..6cfb5a7 100644 (file)
@@ -30,14 +30,14 @@ import java.util.Set;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.junit.MockitoJUnitRunner;
+import org.mockito.runners.MockitoJUnitRunner;
 import org.onap.aai.schemaif.SchemaProviderException;
 import org.onap.aai.schemaif.definitions.EdgeSchema;
 import org.onap.aai.schemaif.definitions.PropertySchema;
 import org.onap.aai.schemaif.definitions.VertexSchema;
 import org.onap.aai.schemaif.definitions.types.DataType.Type;
 
-@RunWith(MockitoJUnitRunner.Silent.class)
+@RunWith(MockitoJUnitRunner.class)
 public class OxmSchemaProviderTest extends OxmSchemaServiceSetup {
 
     @Test
@@ -49,15 +49,15 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup {
             VertexSchema vertSchema = schemaProvider.getVertexSchema("pserver", schemaProvider.getLatestSchemaVersion());
             System.out.println(vertSchema.toString());
 
-            EdgeSchema edgeSchema = schemaProvider.getEdgeSchema("org.onap.relationships.inventory.LocatedIn", 
+            EdgeSchema edgeSchema = schemaProvider.getEdgeSchema("org.onap.relationships.inventory.LocatedIn",
                     "cloud-region", "zone", schemaProvider.getLatestSchemaVersion());
             System.out.println(edgeSchema.toString());
-            
+
             // Validate vertex schema
             assertTrue(vertSchema.getName().equals("pserver"));
             assertTrue(vertSchema.getAnnotationValue("nameProps").equals("pserver-name2"));
             assertTrue(vertSchema.getAnnotationValue("dependentOn") == null);
-            
+
             PropertySchema propSchema = vertSchema.getPropertySchema("hostname");
             assertTrue(propSchema.getName().equals("hostname"));
             assertTrue(propSchema.getDefaultValue().equals(""));
@@ -66,7 +66,7 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup {
             assertTrue(propSchema.getDataType().getType().compareTo(Type.STRING) == 0);
             Object obj = propSchema.validateValue("somestring");
             assertTrue(obj instanceof String);
-            
+
             propSchema = vertSchema.getPropertySchema("in-maint");
             assertTrue(propSchema.getName().equals("in-maint"));
             assertTrue(propSchema.getDefaultValue().equals("false"));
@@ -79,8 +79,8 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup {
             obj = propSchema.validateValue("false");
             assertTrue(obj instanceof Boolean);
             assertTrue(propSchema.getDataType().validateValue("badValue") == null);
-            
-            
+
+
             propSchema = vertSchema.getPropertySchema("aai-node-type");
             assertTrue(propSchema.getName().equals("aai-node-type"));
             assertTrue(propSchema.getDefaultValue().equals(""));
@@ -88,7 +88,7 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup {
             assertTrue(!propSchema.isKey());
             assertTrue(propSchema.isReserved());
             assertTrue(propSchema.getDataType().getType().compareTo(Type.STRING) == 0);
-            
+
             propSchema = vertSchema.getPropertySchema("pserver-id");
             assertTrue(propSchema.getName().equals("pserver-id"));
             assertTrue(propSchema.getDefaultValue().equals(""));
@@ -96,7 +96,7 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup {
             assertTrue(!propSchema.isReserved());
             assertTrue(propSchema.isKey());
             assertTrue(propSchema.getDataType().getType().compareTo(Type.STRING) == 0);
-            
+
             propSchema = vertSchema.getPropertySchema("number-of-cpus");
             assertTrue(propSchema.getName().equals("number-of-cpus"));
             assertTrue(propSchema.getAnnotationValue("source-of-truth-type").equals("openstack"));
@@ -107,7 +107,7 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup {
             assertTrue(obj instanceof Integer);
             assertTrue(propSchema.getDataType().validateValue("5.5") == null);
             assertTrue(propSchema.getDataType().validateValue("xyz") == null);
-            
+
             // Validate edge schema
             assertTrue(edgeSchema.getName().equals("org.onap.relationships.inventory.LocatedIn"));
             assertTrue(edgeSchema.getSource().equals("cloud-region"));
@@ -115,7 +115,7 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup {
             assertTrue(edgeSchema.getMultiplicity().equals(EdgeSchema.Multiplicity.MANY_2_ONE));
             assertTrue(edgeSchema.getAnnotationValue("contains-other-v").equals("NONE"));
             assertTrue(edgeSchema.getPropertySchema("prevent-delete").getDataType().getType().equals(Type.STRING));
-            
+
             // Validate 'dependentOn' annotation
             vertSchema = schemaProvider.getVertexSchema("tenant", schemaProvider.getLatestSchemaVersion());
             assertTrue(vertSchema.getAnnotationValue("dependentOn").equals("cloud-region"));
@@ -128,19 +128,19 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup {
             assertTrue(false);
         }
     }
-    
+
     @Test
     public void testAdjacentEdges() throws SchemaProviderException {
         try {
             OxmSchemaProvider schemaProvider = new OxmSchemaProvider();
             schemaProvider.loadSchema();
 
-            Set<EdgeSchema> edgeSchemaList = 
+            Set<EdgeSchema> edgeSchemaList =
                     schemaProvider.getAdjacentEdgeSchema("snapshot", schemaProvider.getLatestSchemaVersion());
-            
+
             // Validate edge schema
             assertTrue(edgeSchemaList.size() == 2);
-            
+
             for (EdgeSchema es : edgeSchemaList) {
                 System.out.println(es.toString());
                 if (es.getName().equals("org.onap.relationships.inventory.BelongsTo")) {
@@ -166,15 +166,15 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup {
             assertTrue(false);
         }
     }
-    
+
     @Test
     public void testValidSourceTargetEdge() throws SchemaProviderException {
         try {
             OxmSchemaProvider schemaProvider = new OxmSchemaProvider();
             schemaProvider.loadSchema();
 
-            Set<EdgeSchema> edgeSchemaList = 
-                    schemaProvider.getEdgeSchemaForSourceTarget("service-instance", "customer", 
+            Set<EdgeSchema> edgeSchemaList =
+                    schemaProvider.getEdgeSchemaForSourceTarget("service-instance", "customer",
                             schemaProvider.getLatestSchemaVersion());
 
             // Validate edge schema
@@ -183,14 +183,14 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup {
             assertTrue(edgeSchemaList.iterator().next().getSource().equals("service-instance"));
             assertTrue(edgeSchemaList.iterator().next().getTarget().equals("customer"));
             assertTrue(edgeSchemaList.iterator().next().getMultiplicity().equals(EdgeSchema.Multiplicity.MANY_2_MANY));
-            
-            edgeSchemaList = 
-                    schemaProvider.getEdgeSchemaForSourceTarget("cloud-region", "complex", 
+
+            edgeSchemaList =
+                    schemaProvider.getEdgeSchemaForSourceTarget("cloud-region", "complex",
                             schemaProvider.getLatestSchemaVersion());
-            
+
             // Validate edge schema
             assertTrue(edgeSchemaList.size() == 2);
-            
+
             for (EdgeSchema es : edgeSchemaList) {
                 System.out.println(es.toString());
                 if (es.getName().equals("org.onap.relationships.inventory.FoundIn")) {
@@ -207,11 +207,11 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup {
                     assertTrue(false);
                 }
             }
-            
-            edgeSchemaList = 
-                    schemaProvider.getEdgeSchemaForSourceTarget("cloud-region", "bad-node", 
+
+            edgeSchemaList =
+                    schemaProvider.getEdgeSchemaForSourceTarget("cloud-region", "bad-node",
                             schemaProvider.getLatestSchemaVersion());
-            
+
             // Validate edge schema
             assertTrue(edgeSchemaList.size() == 0);
         }
@@ -223,23 +223,23 @@ public class OxmSchemaProviderTest extends OxmSchemaServiceSetup {
             assertTrue(false);
         }
     }
-    
+
     @Test
     public void testInvalidVertexOrEdge() throws SchemaProviderException {
         try {
             OxmSchemaProvider schemaProvider = new OxmSchemaProvider();
             schemaProvider.loadSchema();
 
-            VertexSchema vertSchema = 
+            VertexSchema vertSchema =
                     schemaProvider.getVertexSchema("bad-node", schemaProvider.getLatestSchemaVersion());
             assertTrue(vertSchema == null);
 
-            EdgeSchema edgeSchema = schemaProvider.getEdgeSchema("org.onap.relationships.inventory.LocatedIn", 
+            EdgeSchema edgeSchema = schemaProvider.getEdgeSchema("org.onap.relationships.inventory.LocatedIn",
                     "cloud-region", "bad-node", schemaProvider.getLatestSchemaVersion());
             assertTrue(edgeSchema == null);
-            
-            Set<EdgeSchema> edgeSchemaList = 
-                    schemaProvider.getAdjacentEdgeSchema("org.onap.nodes.bad-node", 
+
+            Set<EdgeSchema> edgeSchemaList =
+                    schemaProvider.getAdjacentEdgeSchema("org.onap.nodes.bad-node",
                             schemaProvider.getLatestSchemaVersion());
             assertTrue(edgeSchemaList.isEmpty());
         }
index 3e21f45..2b25758 100644 (file)
@@ -26,7 +26,7 @@ limitations under the License.
        <parent>
                <groupId>org.onap.aai.aai-common</groupId>
                <artifactId>aai-parent</artifactId>
-               <version>1.6.10-SNAPSHOT</version>
+               <version>1.6.11-SNAPSHOT</version>
                <relativePath>../aai-parent/pom.xml</relativePath>
        </parent>
        <artifactId>aai-schema-ingest</artifactId>
index 8fdce62..a9cd1f7 100644 (file)
@@ -50,8 +50,10 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 @RunWith(SpringJUnit4ClassRunner.class)
 @ContextConfiguration(classes = {MockProvider.class, EdgesConfiguration.class})
 @TestPropertySource(
-        properties = {"schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-wiring-test.properties"})
-
+        properties = {
+            "schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-wiring-test.properties",
+            "spring.main.allow-bean-definition-overriding=true"
+        })
 @DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
 @SpringBootTest
 public class EdgeIngestorTest {
index 7035aff..dc4e1e4 100644 (file)
@@ -51,7 +51,10 @@ import org.w3c.dom.Document;
 
 @RunWith(SpringJUnit4ClassRunner.class)
 @TestPropertySource(
-        properties = {"schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-ss-wiring-test.properties"})
+        properties = {
+            "schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-ss-wiring-test.properties",
+            "spring.main.allow-bean-definition-overriding=true"
+        })
 
 @ContextConfiguration(classes = {MockProvider.class, NodesConfiguration.class})
 @DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
index af94765..2a5068f 100644 (file)
@@ -23,12 +23,14 @@ package org.onap.aai.setup;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
+@Ignore("Support of schema ingest via context configuration with prop file is removed as it won't work with spring boot 2")
 @RunWith(SpringJUnit4ClassRunner.class)
 @ContextConfiguration(locations = {"classpath:forWiringTests/testUsingPropFileContext.xml"})
 public class SchemaLocationsBeanXMLSetterWithPropFileTest {
index 1d3e61e..b4e2c02 100644 (file)
@@ -14,6 +14,6 @@
         <property name="edgeDirectory" value="${schema.edges.location}" />
     </bean>
     
-    <context:property-placeholder location="classpath:forWiringTests/schema-ingest-for-xml-test.properties" ignore-unresolvable="true" />
+    <context:property-placeholder location="/forWiringTests/schema-ingest-for-xml-test.properties" ignore-unresolvable="true" />
 
-</beans>
\ No newline at end of file
+</beans>
index 17a1525..5acbb10 100644 (file)
@@ -29,7 +29,7 @@
     <parent>
         <groupId>org.onap.aai.aai-common</groupId>
         <artifactId>aai-parent</artifactId>
-        <version>1.6.10-SNAPSHOT</version>
+        <version>1.6.11-SNAPSHOT</version>
         <relativePath>../aai-parent/pom.xml</relativePath>
     </parent>
     <artifactId>aai-utils</artifactId>
diff --git a/pom.xml b/pom.xml
index ab6b7ff..3dd193a 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,7 @@
 
     <groupId>org.onap.aai.aai-common</groupId>
     <artifactId>aai-common</artifactId>
-    <version>1.6.10-SNAPSHOT</version>
+    <version>1.6.11-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>aai-aai-common</name>
     <description>Contains all of the common code for resources and traversal repos</description>
     </repositories>
     <!-- End of ONAP Specific Repositories -->
 </project>
+<!-- noop for release -->
index c7bd189..ac165c9 100644 (file)
@@ -5,7 +5,7 @@
 
 major_version=1
 minor_version=6
-patch_version=10
+patch_version=11
 
 base_version=${major_version}.${minor_version}.${patch_version}