Security uplift 97/140697/1
authoradheli.tavares <adheli.tavares@est.tech>
Mon, 14 Apr 2025 15:41:14 +0000 (16:41 +0100)
committeradheli.tavares <adheli.tavares@est.tech>
Mon, 14 Apr 2025 15:41:45 +0000 (16:41 +0100)
- fix error messages from new version of gson

Issue-ID: POLICY-5302
Change-Id: Ie278b10465f703e6245db120b4106b9a5987fd2e
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
testsuites/integration/integration-uservice-test/pom.xml
testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParametersHandlerTest.java

index 86b0e34..49dc0ff 100644 (file)
@@ -1,7 +1,7 @@
 <!--
   ============LICENSE_START=======================================================
    Copyright (C) 2018 Ericsson. All rights reserved.
-   Modifications Copyright (C) 2019-2020,2022-2025 Nordix Foundation.
+   Modifications Copyright (C) 2019-2020,2022-2025 OpenInfra Foundation Europe. All rights reserved.
    Modifications Copyright (C) 2020 Bell Canada.
    Modifications Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
   ================================================================================
         <dependency>
             <groupId>org.apache.kafka</groupId>
             <artifactId>kafka_2.13</artifactId>
-            <version>${version.kafka}</version>
+            <version>3.9.0</version>
             <scope>test</scope>
         </dependency>
         <dependency>
index 1714f43..7f35791 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Ericsson. All rights reserved.
- *  Modifications Copyright (C) 2020, 2024 Nordix Foundation
+ *  Modifications Copyright (C) 2020, 20242025 OpenInfra Foundation Europe. All rights reserved.
  *  Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -111,7 +111,7 @@ class EventGeneratorParametersHandlerTest {
         assertThatThrownBy(() -> {
             String[] arguments = new String[] {"-c", "src/test/resources/parameters/unit/BadHost.json"};
             handler.parse(arguments);
-        }).hasMessage("Error parsing JSON parameters from configuration file "
+        }).hasMessageContaining("Error parsing JSON parameters from configuration file "
             + "\"src/test/resources/parameters/unit/BadHost.json\": "
             + "com.google.gson.stream.MalformedJsonException: "
             + "Unexpected value at line 3 column 14 path $.host");
@@ -119,7 +119,7 @@ class EventGeneratorParametersHandlerTest {
         assertThatThrownBy(() -> {
             String[] arguments = new String[] {"-c", "src/test/resources/parameters/unit/BadPort.json"};
             handler.parse(arguments);
-        }).hasMessage("Error parsing JSON parameters from configuration file "
+        }).hasMessageContaining("Error parsing JSON parameters from configuration file "
             + "\"src/test/resources/parameters/unit/BadPort.json\": "
             + "java.lang.IllegalStateException: Expected an int "
             + "but was BOOLEAN at line 4 column 18 path $.port");
@@ -127,7 +127,7 @@ class EventGeneratorParametersHandlerTest {
         assertThatThrownBy(() -> {
             String[] arguments = new String[] {"-c", "src/test/resources/parameters/unit/Empty.json"};
             handler.parse(arguments);
-        }).hasMessage("No parameters found in configuration file "
+        }).hasMessageContaining("No parameters found in configuration file "
             + "\"src/test/resources/parameters/unit/Empty.json\"");
 
         assertThatThrownBy(() -> {