upgrade some 3rd parties dependencies 37/98937/3
authorEylon Malin <eylon.malin@intl.att.com>
Thu, 28 Nov 2019 13:35:16 +0000 (15:35 +0200)
committerEylon Malin <eylon.malin@intl.att.com>
Sun, 1 Dec 2019 06:11:30 +0000 (08:11 +0200)
Issue-ID: VID-705
Change-Id: Idd72448ed1b2f033005ff8031856efe06f67cdf4
Signed-off-by: Eylon Malin <eylon.malin@intl.att.com>
epsdk-app-onap/pom.xml
vid-app-common/pom.xml
vid-app-common/src/main/java/org/onap/vid/controller/OperationalEnvironmentController.java
vid-app-common/src/main/java/org/onap/vid/services/AAIServiceTree.java
vid-automation/src/main/java/vid/automation/test/test/EnvironmentsTest.java
vid-automation/src/main/java/vid/automation/test/test/HealthStatusTest.java

index 8f63a6d..0dc8eac 100755 (executable)
@@ -25,9 +25,9 @@
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
         <epsdk.version>2.5.0</epsdk.version>
-        <jackson.version>2.9.9</jackson.version>
-        <jackson.databind.version>2.9.9.3</jackson.databind.version>
-        <springframework.version>5.1.9.RELEASE</springframework.version>
+        <jackson.version>2.10.1</jackson.version>
+        <jackson.databind.version>2.10.1</jackson.databind.version>
+        <springframework.version>5.2.0.RELEASE</springframework.version>
         <!-- epsdk-core is importing this class, which is only on spring-orm 4 but not in orm 5:
          org.springframework.orm.hibernate4.HibernateTransactionManager
          so following orm.version lets epsdk-core find it -->
index 9e5f58d..f618ec8 100755 (executable)
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
         <epsdk.version>2.5.0</epsdk.version>
-        <springframework.version>5.1.9.RELEASE</springframework.version>
+        <springframework.version>5.2.0.RELEASE</springframework.version>
         <springframework.orm.version>4.3.22.RELEASE</springframework.orm.version>
         <!-- epsdk-core is importing this class, which is only on spring-orm 4 but not in orm 5:
          org.springframework.orm.hibernate4.HibernateTransactionManager
          so following orm.version lets epsdk-core find it -->
         <hibernate.version>4.3.11.Final</hibernate.version>
-        <jackson.version>2.9.9</jackson.version>
-        <jackson.databind.version>2.9.9.3</jackson.databind.version>
+        <jackson.version>2.10.1</jackson.version>
+        <jackson.databind.version>2.10.1</jackson.databind.version>
         <onap.logging.version>1.6.1</onap.logging.version>
-        <jersey.version>2.29</jersey.version>
+        <jersey.version>2.29.1</jersey.version>
         <surefire.version>2.22.1</surefire.version>
         <selenium.version>3.141.59</selenium.version>
         <sonar.coverage.exclusions>**/webapp/**/*,**/*.js</sonar.coverage.exclusions>
@@ -54,7 +54,7 @@
         <sitePath>content/sites/site/org/onap/vid/${project.version}</sitePath>
 
         <aspectj.version>1.8.9</aspectj.version>
-        <kotlin.version>1.3.30</kotlin.version>
+        <kotlin.version>1.3.60</kotlin.version>
         <kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
 
         <eirslett.version>1.6</eirslett.version>
index 44bdc81..d291f99 100644 (file)
  */
 package org.onap.vid.controller;
 
+import static org.onap.vid.utils.Logging.getMethodCallerName;
+import static org.onap.vid.utils.Logging.getMethodName;
+
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.google.common.base.MoreObjects;
 import io.joshworks.restclient.http.HttpResponse;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import javax.servlet.http.HttpServletRequest;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.exception.ExceptionUtils;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
@@ -42,19 +53,13 @@ import org.onap.vid.utils.SystemPropertiesWrapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.web.bind.MissingServletRequestParameterException;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletRequest;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-import static org.onap.vid.utils.Logging.getMethodCallerName;
-import static org.onap.vid.utils.Logging.getMethodName;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseStatus;
+import org.springframework.web.bind.annotation.RestController;
 
 @RestController
 @RequestMapping("operationalEnvironment")
@@ -64,7 +69,7 @@ public class OperationalEnvironmentController extends VidRestrictedBaseControlle
     private final MsoBusinessLogic msoBusinessLogic;
     private final SystemPropertiesWrapper systemPropertiesWrapper;
 
-    private static final Pattern RECOVERY_ACTION_MESSAGE_PATTERN = Pattern.compile("from String \"(.*)\": value not");
+    private static final Pattern RECOVERY_ACTION_MESSAGE_PATTERN = Pattern.compile("from String \"(.*)\": not one");
 
 
     @Autowired
index d62d5d5..7b0e5f5 100644 (file)
 
 package org.onap.vid.services;
 
+import static java.util.Comparator.comparing;
+import static java.util.stream.Collectors.toSet;
+import static org.apache.commons.lang3.ObjectUtils.defaultIfNull;
+import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER;
+
 import com.fasterxml.jackson.databind.JsonNode;
 import com.google.common.collect.ImmutableList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.concurrent.ConcurrentSkipListSet;
+import java.util.concurrent.ExecutorService;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import javax.inject.Inject;
+import javax.ws.rs.core.Response;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.onap.vid.aai.AaiClientInterface;
 import org.onap.vid.aai.util.AAITreeConverter;
@@ -36,19 +53,6 @@ import org.onap.vid.utils.Tree;
 import org.springframework.http.HttpMethod;
 import org.springframework.stereotype.Component;
 
-import javax.inject.Inject;
-import javax.ws.rs.core.Response;
-import java.util.*;
-import java.util.concurrent.ConcurrentSkipListSet;
-import java.util.concurrent.ExecutorService;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-import static java.util.Comparator.comparing;
-import static java.util.stream.Collectors.toSet;
-import static org.apache.commons.lang3.ObjectUtils.defaultIfNull;
-import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER;
-
 @Component
 public class AAIServiceTree {
 
@@ -207,12 +211,14 @@ public class AAIServiceTree {
         Map<String, String> modelNameByModelVersionId = new HashMap<>();
 
         JsonNode models = getModels(aaiClient, invariantIDs);
-        for (JsonNode model: models) {
-            JsonNode modelVersions = model.get("model-vers").get("model-ver");
-            for (JsonNode modelVersion: modelVersions) {
-                final String modelVersionId = modelVersion.get("model-version-id").asText();
-                modelVersionByModelVersionId.put(modelVersionId, modelVersion.get("model-version").asText());
-                modelNameByModelVersionId.put(modelVersionId, modelVersion.get("model-name").asText());
+        if (models!=null) {
+            for (JsonNode model : models) {
+                JsonNode modelVersions = model.get("model-vers").get("model-ver");
+                for (JsonNode modelVersion : modelVersions) {
+                    final String modelVersionId = modelVersion.get("model-version-id").asText();
+                    modelVersionByModelVersionId.put(modelVersionId, modelVersion.get("model-version").asText());
+                    modelNameByModelVersionId.put(modelVersionId, modelVersion.get("model-name").asText());
+                }
             }
         }
 
index 03378b6..962a1de 100644 (file)
@@ -1,6 +1,13 @@
 package vid.automation.test.test;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static vid.automation.test.Constants.TestEnvironments.REFRESH_BUTTON;
+
 import com.google.common.collect.ImmutableMap;
+import java.util.List;
+import java.util.Map;
 import org.junit.Assert;
 import org.onap.sdc.ci.tests.utilities.GeneralUIUtils;
 import org.openqa.selenium.WebElement;
@@ -9,7 +16,13 @@ import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 import vid.automation.test.Constants;
-import vid.automation.test.infra.*;
+import vid.automation.test.infra.Click;
+import vid.automation.test.infra.Exists;
+import vid.automation.test.infra.Features;
+import vid.automation.test.infra.Get;
+import vid.automation.test.infra.Input;
+import vid.automation.test.infra.SelectOption;
+import vid.automation.test.infra.Wait;
 import vid.automation.test.model.Environment;
 import vid.automation.test.sections.SideMenu;
 import vid.automation.test.sections.TestEnvironmentPage;
@@ -17,12 +30,6 @@ import vid.automation.test.sections.VidBasePage;
 import vid.automation.test.services.SimulatorApi;
 import vid.automation.test.utils.ReadFile;
 
-import java.util.List;
-import java.util.Map;
-
-import static org.junit.Assert.*;
-import static vid.automation.test.Constants.TestEnvironments.REFRESH_BUTTON;
-
 
 /*
 
@@ -349,7 +356,7 @@ public class EnvironmentsTest extends VidBaseTestCase {
     }
 
     @Test
-    public void testApplicationEnvironmentActivationBadManifestStructure() throws Exception {
+    public void testApplicationEnvironmentActivationBadManifestStructure() {
         testApplicationEnvironmentActivationBadManifestStructure("bad_manifest_structure.json", "Manifest structure is wrong");
         testApplicationEnvironmentActivationBadManifestStructure("manifest_with_wrong_recovery_action.json",
                 "Wrong value for RecoveryAction in manifest. Allowed options are: abort, retry, skip. Wrong value is: leave");
index 2bb97aa..b8f90c2 100644 (file)
@@ -1,30 +1,27 @@
 package vid.automation.test.test;
 
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.equalTo;
+import static vid.automation.test.services.SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET;
+
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.common.collect.ImmutableList;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Map;
+import org.onap.sdc.ci.tests.utilities.GeneralUIUtils;
 import org.onap.simulator.presetGenerator.presets.BasePresets.BasePreset;
 import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet;
 import org.onap.simulator.presetGenerator.presets.ecompportal_att.PresetGetSessionSlotCheckIntervalGet;
-import org.onap.sdc.ci.tests.utilities.GeneralUIUtils;
 import org.openqa.selenium.remote.RemoteWebElement;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 import vid.automation.test.infra.Click;
 import vid.automation.test.infra.Get;
-import vid.automation.test.infra.Wait;
 import vid.automation.test.sections.VidBasePage;
 import vid.automation.test.services.SimulatorApi;
 
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Map;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.containsString;
-import static org.hamcrest.Matchers.equalTo;
-import static org.testng.Assert.assertTrue;
-import static vid.automation.test.services.SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET;
-
 public class HealthStatusTest extends VidBaseTestCase {
 
     private VidBasePage vidBasePage = new VidBasePage();
@@ -45,7 +42,7 @@ public class HealthStatusTest extends VidBaseTestCase {
     public void testAaiHealthStatus(Collection<BasePreset> presets, String cssName, String description, int httpCode) throws IOException {
         SimulatorApi.registerExpectationFromPresets(presets, CLEAR_THEN_SET);
         refreshStatus();
-        assertTrue(Wait.waitByClassAndTextXpathOnly(cssName, "AAI", 10)); //instead of ultimate wait
+        GeneralUIUtils.ultimateWait(); //instead of assertTrue(Wait.waitByClassAndTextXpathOnly(cssName, "AAI", 10))
         RemoteWebElement componentName = (RemoteWebElement)Get.byTestId("component-name-AAI");
         assertThat("Wrong component name", componentName.getText(), equalTo("AAI"));
         assertThat("Wrong css for component name", componentName.getAttribute("class"), containsString(cssName));