aboutsummaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/apex-pdp-stability/pom.xml2
-rw-r--r--testsuites/integration/integration-common/pom.xml2
-rw-r--r--testsuites/integration/integration-common/src/test/java/org/onap/policy/apex/testsuites/integration/common/model/SampleDomainModelSaverTest.java31
-rw-r--r--testsuites/integration/integration-common/src/test/java/org/onap/policy/apex/testsuites/integration/common/testclasses/TestPingClassTest.java83
-rw-r--r--testsuites/integration/integration-context-test/pom.xml2
-rw-r--r--testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/ContextInstantiation.java105
-rw-r--r--testsuites/integration/integration-executor-test/pom.xml2
-rw-r--r--testsuites/integration/integration-uservice-test/pom.xml2
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestExecutionPropertyRest.java26
-rw-r--r--testsuites/integration/pom.xml2
-rw-r--r--testsuites/performance/performance-benchmark-test/pom.xml2
-rw-r--r--testsuites/performance/pom.xml2
-rw-r--r--testsuites/pom.xml2
13 files changed, 78 insertions, 185 deletions
diff --git a/testsuites/apex-pdp-stability/pom.xml b/testsuites/apex-pdp-stability/pom.xml
index 1a9613450..e6dc04db9 100644
--- a/testsuites/apex-pdp-stability/pom.xml
+++ b/testsuites/apex-pdp-stability/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.testsuites</groupId>
<artifactId>apex-testsuites</artifactId>
- <version>2.4.0-SNAPSHOT</version>
+ <version>2.4.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.testsuites.stability</groupId>
diff --git a/testsuites/integration/integration-common/pom.xml b/testsuites/integration/integration-common/pom.xml
index c77536981..987d7fc1b 100644
--- a/testsuites/integration/integration-common/pom.xml
+++ b/testsuites/integration/integration-common/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
<artifactId>apex-integration</artifactId>
- <version>2.4.0-SNAPSHOT</version>
+ <version>2.4.1-SNAPSHOT</version>
</parent>
<artifactId>integration-common</artifactId>
diff --git a/testsuites/integration/integration-common/src/test/java/org/onap/policy/apex/testsuites/integration/common/model/SampleDomainModelSaverTest.java b/testsuites/integration/integration-common/src/test/java/org/onap/policy/apex/testsuites/integration/common/model/SampleDomainModelSaverTest.java
index 241f69dc0..c7ab1d9a0 100644
--- a/testsuites/integration/integration-common/src/test/java/org/onap/policy/apex/testsuites/integration/common/model/SampleDomainModelSaverTest.java
+++ b/testsuites/integration/integration-common/src/test/java/org/onap/policy/apex/testsuites/integration/common/model/SampleDomainModelSaverTest.java
@@ -1,28 +1,29 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2020 Nordix Foundation
* ================================================================================
* 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.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
package org.onap.policy.apex.testsuites.integration.common.model;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
import java.io.File;
import java.io.IOException;
@@ -30,6 +31,7 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Comparator;
import org.junit.Test;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
/**
* Test the sample domain model saver.
@@ -37,32 +39,19 @@ import org.junit.Test;
public class SampleDomainModelSaverTest {
@Test
- public void testSampleDomainModelSaver() throws IOException {
- try {
- SampleDomainModelSaver.main(null);
- fail("test should throw an exception");
- } catch (Exception exc) {
- assertEquals("java.lang.NullPointerException", exc.getClass().getName());
- }
+ public void testSampleDomainModelSaver() throws IOException, ApexException {
+ assertThatThrownBy(() -> SampleDomainModelSaver.main(null)).isInstanceOf(NullPointerException.class);
String[] args0 =
{ "two", "arguments" };
- try {
- SampleDomainModelSaver.main(args0);
- } catch (Exception exc) {
- fail("test should not throw an exception");
- }
+ SampleDomainModelSaver.main(args0);
Path tempDirectory = Files.createTempDirectory("ApexModelTempDir");
String[] args1 =
{ tempDirectory.toString() };
- try {
- SampleDomainModelSaver.main(args1);
- } catch (Exception exc) {
- fail("test should not throw an exception");
- }
+ SampleDomainModelSaver.main(args1);
File tempDir = new File(tempDirectory.toString());
assertTrue(tempDir.isDirectory());
diff --git a/testsuites/integration/integration-common/src/test/java/org/onap/policy/apex/testsuites/integration/common/testclasses/TestPingClassTest.java b/testsuites/integration/integration-common/src/test/java/org/onap/policy/apex/testsuites/integration/common/testclasses/TestPingClassTest.java
index 82f46c04a..92f86f434 100644
--- a/testsuites/integration/integration-common/src/test/java/org/onap/policy/apex/testsuites/integration/common/testclasses/TestPingClassTest.java
+++ b/testsuites/integration/integration-common/src/test/java/org/onap/policy/apex/testsuites/integration/common/testclasses/TestPingClassTest.java
@@ -21,8 +21,8 @@
package org.onap.policy.apex.testsuites.integration.common.testclasses;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
@@ -32,7 +32,7 @@ import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
*/
public class TestPingClassTest {
@Test
- public void testPingClass() {
+ public void testPingClass() throws ApexException {
PingTestClass ptc = new PingTestClass();
ptc.setName("Hello");
@@ -46,84 +46,43 @@ public class TestPingClassTest {
ptc.setPongTime(-1);
assertEquals(-1, ptc.getPongTime());
-
- try {
- ptc.verify();
- fail("test should throw an exception");
- } catch (ApexException ae) {
- assertEquals("TestPing is not valid, name does not start with \"Rose\"", ae.getMessage());
- }
+ assertThatThrownBy(() -> ptc.verify()).isInstanceOf(ApexException.class)
+ .hasMessageContaining("TestPing is not valid, name does not start with \"Rose\"");
ptc.setName(null);
- try {
- ptc.verify();
- fail("test should throw an exception");
- } catch (ApexException ae) {
- assertEquals("TestPing is not valid, name length null or less than 4", ae.getMessage());
- }
+ assertThatThrownBy(() -> ptc.verify()).isInstanceOf(ApexException.class)
+ .hasMessageContaining("TestPing is not valid, name length null or less than 4");
ptc.setName("Ros");
- try {
- ptc.verify();
- fail("test should throw an exception");
- } catch (ApexException ae) {
- assertEquals("TestPing is not valid, name length null or less than 4", ae.getMessage());
- }
+ assertThatThrownBy(() -> ptc.verify()).isInstanceOf(ApexException.class)
+ .hasMessageContaining("TestPing is not valid, name length null or less than 4");
ptc.setName("Rose");
- try {
- ptc.verify();
- fail("test should throw an exception");
- } catch (ApexException ae) {
- assertEquals("TestPing is not valid, description length null or less than 44", ae.getMessage());
- }
+ assertThatThrownBy(() -> ptc.verify()).isInstanceOf(ApexException.class)
+ .hasMessageContaining("TestPing is not valid, description length null or less than 44");
ptc.setDescription(null);
- try {
- ptc.verify();
- fail("test should throw an exception");
- } catch (ApexException ae) {
- assertEquals("TestPing is not valid, description length null or less than 44", ae.getMessage());
- }
+ assertThatThrownBy(() -> ptc.verify()).isInstanceOf(ApexException.class)
+ .hasMessageContaining("TestPing is not valid, description length null or less than 44");
ptc.setDescription("A rose by any other name would smell as swee");
- try {
- ptc.verify();
- fail("test should throw an exception");
- } catch (ApexException ae) {
- assertEquals("TestPing is not valid, description length null or less than 44", ae.getMessage());
- }
+ assertThatThrownBy(() -> ptc.verify()).isInstanceOf(ApexException.class)
+ .hasMessageContaining("TestPing is not valid, description length null or less than 44");
ptc.setDescription("A rose by any other name would smell as swell");
- try {
- ptc.verify();
- fail("test should throw an exception");
- } catch (ApexException ae) {
- assertEquals("TestPing is not valid, description is incorrect", ae.getMessage());
- }
+ assertThatThrownBy(() -> ptc.verify()).isInstanceOf(ApexException.class)
+ .hasMessageContaining("TestPing is not valid, description is incorrect");
ptc.setDescription("A rose by any other name would smell as sweet");
- try {
- ptc.verify();
- fail("test should throw an exception");
- } catch (ApexException ae) {
- assertEquals("TestPing is not valid, pong time -1 is less than ping time 0", ae.getMessage());
- }
+ assertThatThrownBy(() -> ptc.verify()).isInstanceOf(ApexException.class)
+ .hasMessageContaining("TestPing is not valid, pong time -1 is less than ping time 0");
ptc.setPongTime(-2);
- try {
- ptc.verify();
- fail("test should throw an exception");
- } catch (ApexException ae) {
- assertEquals("TestPing is not valid, pong time -2 is less than ping time 0", ae.getMessage());
- }
+ assertThatThrownBy(() -> ptc.verify()).isInstanceOf(ApexException.class)
+ .hasMessageContaining("TestPing is not valid, pong time -2 is less than ping time 0");
ptc.setPongTime(1);
- try {
- ptc.verify();
- } catch (ApexException ae) {
- fail("test should not throw an exception");
- }
+ ptc.verify();
assertEquals(
"PingTestClass(id=0, name=Rose, "
diff --git a/testsuites/integration/integration-context-test/pom.xml b/testsuites/integration/integration-context-test/pom.xml
index 0cd1ae35a..a117e0553 100644
--- a/testsuites/integration/integration-context-test/pom.xml
+++ b/testsuites/integration/integration-context-test/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
<artifactId>apex-integration</artifactId>
- <version>2.4.0-SNAPSHOT</version>
+ <version>2.4.1-SNAPSHOT</version>
</parent>
<artifactId>integration-context-test</artifactId>
diff --git a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/ContextInstantiation.java b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/ContextInstantiation.java
index 475316a4d..9e9e4626e 100644
--- a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/ContextInstantiation.java
+++ b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/ContextInstantiation.java
@@ -21,6 +21,7 @@
package org.onap.policy.apex.testsuites.integration.context.distribution;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
@@ -242,15 +243,8 @@ public class ContextInstantiation {
assertTrue(externalContextAlbum.values().containsAll(mapValues));
// Check that clearing does not work
- try {
- externalContextAlbum.clear();
- fail(EXCEPTION_MESSAGE);
- } catch (final ContextRuntimeException e) {
- assertEquals("album \"ExternalContextAlbum:0.0.1\" clear() not allowed on read only albums",
- e.getMessage());
- LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
- }
-
+ assertThatThrownBy(() -> externalContextAlbum.clear()).isInstanceOf(ContextRuntimeException.class)
+ .hasMessageContaining("album \"ExternalContextAlbum:0.0.1\" clear() not allowed on read only albums");
assertEquals(1, externalContextAlbum.size());
assertContextAlbumContains(externalContext, externalContextAlbum);
@@ -258,32 +252,16 @@ public class ContextInstantiation {
final Set<Entry<String, Object>> entrySet = externalContextAlbum.entrySet();
assertEquals(1, entrySet.size());
- try {
- externalContextAlbum.get(null);
- } catch (final ContextRuntimeException e) {
- assertEquals("album \"ExternalContextAlbum:0.0.1\" null keys are illegal on keys for get()",
- e.getMessage());
- LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
- }
-
+ assertThatThrownBy(() -> externalContextAlbum.get(null)).isInstanceOf(ContextRuntimeException.class)
+ .hasMessageContaining("album \"ExternalContextAlbum:0.0.1\" null keys are illegal on keys for get()");
final Object aObject = externalContextAlbum.get(EXTERNAL_CONTEXT);
assertEquals(aObject, externalContext);
// put null keys should fail, throws a runtime exception
- try {
- externalContextAlbum.put(null, null);
- } catch (final ContextRuntimeException e) {
- assertEquals("album \"ExternalContextAlbum:0.0.1\" null keys are illegal on keys for put()",
- e.getMessage());
- LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
- }
-
- try {
- externalContextAlbum.put("TestExternalContextItem00A", null);
- } catch (final ContextRuntimeException e) {
- assertEquals(NULL_VALUES_ILLEGAL_TAG + "\"TestExternalContextItem00A\" for put()", e.getMessage());
- LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
- }
+ assertThatThrownBy(() -> externalContextAlbum.put(null, null))
+ .hasMessageContaining("album \"ExternalContextAlbum:0.0.1\" null keys are illegal on keys for put()");
+ assertThatThrownBy(() -> externalContextAlbum.put("TestExternalContextItem00A", null))
+ .hasMessageContaining(NULL_VALUES_ILLEGAL_TAG + "\"TestExternalContextItem00A\" for put()");
assertEquals(tciAa, externalContextItem.getTestExternalContextItem00A());
// Should return the hash set
@@ -305,29 +283,17 @@ public class ContextInstantiation {
assertTrue(externalContextAlbum.put(EXTERNAL_CONTEXT, externalContext).equals(externalContextOther));
externalContextItem = (TestExternalContextItem) externalContextAlbum.get(EXTERNAL_CONTEXT);
assertEquals(INT_VAL_3, externalContextItem.getTestExternalContextItem002().getIntValue());
+ assertThatThrownBy(() -> externalContextAlbum.put("TestExternalContextItem00A", null))
+ .hasMessageContaining(NULL_VALUES_ILLEGAL_TAG + "\"TestExternalContextItem00A\" for put()");
- try {
- externalContextAlbum.put("TestExternalContextItem00A", null);
- } catch (final ContextRuntimeException e) {
- assert (e.getMessage().equals(NULL_VALUES_ILLEGAL_TAG + "\"TestExternalContextItem00A\" for put()"));
- LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
- }
assertTrue(externalContextAlbum.get(EXTERNAL_CONTEXT).equals(externalContext));
- try {
- externalContextAlbum.put("TestExternalContextItemFFF", null);
- } catch (final ContextRuntimeException e) {
- assert (e.getMessage().equals(NULL_VALUES_ILLEGAL_TAG + "\"TestExternalContextItemFFF\" for put()"));
- LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
- }
+ assertThatThrownBy(() -> externalContextAlbum.put("TestExternalContextItemFFF", null))
+ .hasMessageContaining(NULL_VALUES_ILLEGAL_TAG + "\"TestExternalContextItemFFF\" for put()");
assertEquals(1, externalContextAlbum.size());
- try {
- externalContextAlbum.put("TestExternalContextItemFFF", null);
- } catch (final ContextRuntimeException e) {
- assertEquals(NULL_VALUES_ILLEGAL_TAG + "\"TestExternalContextItemFFF\" for put()", e.getMessage());
- LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
- }
+ assertThatThrownBy(() -> externalContextAlbum.put("TestExternalContextItemFFF", null))
+ .hasMessageContaining(NULL_VALUES_ILLEGAL_TAG + "\"TestExternalContextItemFFF\" for put()");
assertEquals(1, externalContextAlbum.size());
// Should ignore remove
@@ -341,23 +307,13 @@ public class ContextInstantiation {
private void assertContextAlbumContains(final TestExternalContextItem externalContext,
final ContextAlbum externalContextAlbum) {
- try {
- externalContextAlbum.containsKey(null);
- } catch (final ContextRuntimeException e) {
- assertEquals("null values are illegal on method parameter \"key\"", e.getMessage());
- LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
- }
-
+ assertThatThrownBy(() -> externalContextAlbum.containsKey(null))
+ .hasMessageContaining("null values are illegal on method parameter \"key\"");
assertTrue(externalContextAlbum.containsKey(EXTERNAL_CONTEXT));
assertTrue(!externalContextAlbum.containsKey(GLOBAL_CONTEXT_KEY));
- try {
- externalContextAlbum.containsValue(null);
- } catch (final ContextRuntimeException e) {
- assertEquals("null values are illegal on method parameter \"value\"", e.getMessage());
- LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
- }
-
+ assertThatThrownBy(() -> externalContextAlbum.containsValue(null))
+ .hasMessageContaining("null values are illegal on method parameter \"value\"");
assertTrue(externalContextAlbum.containsValue(externalContext));
assertFalse(externalContextAlbum.containsValue("Hello"));
}
@@ -444,23 +400,12 @@ public class ContextInstantiation {
private void assertPutMethods(final ContextAlbum policyContextAlbum, final TestContextStringItem contextStringItem,
final Map<String, Object> valueMapA) {
- try {
- policyContextAlbum.put(TEST_POLICY_CONTEXT_ITEM000, contextStringItem);
- fail(EXCEPTION_MESSAGE);
- } catch (final ContextRuntimeException e) {
- assertEquals(getMessage(TEST_POLICY_CONTEXT_ITEM000, "TestContextItem006",
- TestContextStringItem.class.getName(), "stringValue=" + STRING_VAL), e.getMessage());
- LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
- }
-
- try {
- policyContextAlbum.putAll(valueMapA);
- fail(EXCEPTION_MESSAGE);
- } catch (final ContextRuntimeException e) {
- assertEquals(getMessage(TEST_POLICY_CONTEXT_ITEM001, "TestContextItem003",
- TestContextLongItem.class.getName(), "longValue=" + INT_VAL_3), e.getMessage());
- LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
- }
+ assertThatThrownBy(() -> policyContextAlbum.put(TEST_POLICY_CONTEXT_ITEM000, contextStringItem))
+ .hasMessageContaining(getMessage(TEST_POLICY_CONTEXT_ITEM000, "TestContextItem006",
+ TestContextStringItem.class.getName(), "stringValue=" + STRING_VAL));
+ assertThatThrownBy(() -> policyContextAlbum.putAll(valueMapA))
+ .hasMessageContaining(getMessage(TEST_POLICY_CONTEXT_ITEM001, "TestContextItem003",
+ TestContextLongItem.class.getName(), "longValue=" + INT_VAL_3));
}
private AxContextModel getAxContextModel() {
diff --git a/testsuites/integration/integration-executor-test/pom.xml b/testsuites/integration/integration-executor-test/pom.xml
index 0ab27328e..bfb178a24 100644
--- a/testsuites/integration/integration-executor-test/pom.xml
+++ b/testsuites/integration/integration-executor-test/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
<artifactId>apex-integration</artifactId>
- <version>2.4.0-SNAPSHOT</version>
+ <version>2.4.1-SNAPSHOT</version>
</parent>
<artifactId>integration-executor-test</artifactId>
diff --git a/testsuites/integration/integration-uservice-test/pom.xml b/testsuites/integration/integration-uservice-test/pom.xml
index 2b447adc2..048a2ab7a 100644
--- a/testsuites/integration/integration-uservice-test/pom.xml
+++ b/testsuites/integration/integration-uservice-test/pom.xml
@@ -26,7 +26,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
<artifactId>apex-integration</artifactId>
- <version>2.4.0-SNAPSHOT</version>
+ <version>2.4.1-SNAPSHOT</version>
</parent>
<artifactId>integration-uservice-test</artifactId>
diff --git a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestExecutionPropertyRest.java b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestExecutionPropertyRest.java
index e483597d0..71c8833be 100644
--- a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestExecutionPropertyRest.java
+++ b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestExecutionPropertyRest.java
@@ -63,8 +63,7 @@ public class TestExecutionPropertyRest {
@BeforeClass
public static void compilePolicy() {
// @formatter:off
- final String[] cliArgs = {
- "-c",
+ final String[] cliArgs = { "-c",
"src/test/resources/policies/executionproperties/policy/ExecutionPropertiesRestTestPolicyModel.apex",
"-l",
"target/ExecutionPropertiesRestTestPolicyModel.log",
@@ -88,7 +87,7 @@ public class TestExecutionPropertyRest {
}
server = HttpServletServerFactoryInstance.getServerFactory().build("TestExecutionPropertyRest", false, null,
- PORT, "/TestExecutionRest", false, false);
+ PORT, "/TestExecutionRest", false, false);
server.addServletClass(null, TestRestClientEndpoint.class.getName());
server.setSerializationProvider(GsonMessageBodyHandler.class.getName());
@@ -129,7 +128,7 @@ public class TestExecutionPropertyRest {
System.setOut(new PrintStream(outContent));
System.setErr(new PrintStream(errContent));
- final String[] args = {"src/test/resources/testdata/executionproperties/RESTEventBadUrl.json"};
+ final String[] args = { "src/test/resources/testdata/executionproperties/RESTEventBadUrl.json" };
final ApexMain apexMain = new ApexMain(args);
ThreadUtilities.sleep(500);
@@ -142,7 +141,8 @@ public class TestExecutionPropertyRest {
System.setErr(stderr);
LOGGER.info("testReplaceUrlTag-OUTSTRING=\n" + outString + "\nEnd-TagUrl");
- assertTrue(outString.contains("no URL has been set for event sending on RESTCLIENT"));
+ assertTrue(outString.contains("invalid URL http://localhost:32801/TestExecutionRest/apex/event/tagId}"
+ + " has been set for event sending on RESTCLIENT"));
}
/**
@@ -153,7 +153,7 @@ public class TestExecutionPropertyRest {
System.setOut(new PrintStream(outContent));
System.setErr(new PrintStream(errContent));
- final String[] args = {"src/test/resources/testdata/executionproperties/RESTEventNoValueSetForTag.json"};
+ final String[] args = { "src/test/resources/testdata/executionproperties/RESTEventNoValueSetForTag.json" };
final ApexMain apexMain = new ApexMain(args);
ThreadUtilities.sleep(2000);
@@ -167,7 +167,7 @@ public class TestExecutionPropertyRest {
LOGGER.info("testReplaceUrlTag-OUTSTRING=\n" + outString + "\nEnd-TagUrl");
assertTrue(outString.contains("key \"Number\" specified on url \"http://localhost:32801/TestExecutionRest/apex"
- + "/event/{tagId}/{Number}\" not found in execution properties passed by the current policy"));
+ + "/event/{tagId}/{Number}\" not found in execution properties passed by the current policy"));
}
/**
@@ -178,7 +178,7 @@ public class TestExecutionPropertyRest {
System.setOut(new PrintStream(outContent));
System.setErr(new PrintStream(errContent));
- final String[] args = {"src/test/resources/testdata/executionproperties/RESTEventBadHttpCodeFilter.json"};
+ final String[] args = { "src/test/resources/testdata/executionproperties/RESTEventBadHttpCodeFilter.json" };
final ApexMain apexMain = new ApexMain(args);
ThreadUtilities.sleep(500);
@@ -201,7 +201,8 @@ public class TestExecutionPropertyRest {
public void testReplaceUrlTag() throws Exception {
final Client client = ClientBuilder.newClient();
- final String[] args = {"src/test/resources/testdata/executionproperties/RESTHttpCodeFilterSetToTagUrlOK.json"};
+ final String[] args = {
+ "src/test/resources/testdata/executionproperties/RESTHttpCodeFilterSetToTagUrlOK.json" };
final ApexMain apexMain = new ApexMain(args);
ThreadUtilities.sleep(1000);
apexMain.shutdown();
@@ -212,7 +213,7 @@ public class TestExecutionPropertyRest {
Response response = null;
response = client.target("http://localhost:32801/TestExecutionRest/apex/event/GetProperUrl")
- .request("application/json").get();
+ .request("application/json").get();
LOGGER.info("testReplaceUrlTag-OUTSTRING=\n" + outString + "\nEnd-TagUrl");
final String responseEntity = response.readEntity(String.class);
@@ -227,8 +228,7 @@ public class TestExecutionPropertyRest {
final Client client = ClientBuilder.newClient();
// @formatter:off
final String[] args = {
- "src/test/resources/testdata/executionproperties/RESTHttpCodeFilterSetToMultiTagUrlOK.json"
- };
+ "src/test/resources/testdata/executionproperties/RESTHttpCodeFilterSetToMultiTagUrlOK.json" };
// @formatter:on
final ApexMain apexMain = new ApexMain(args);
ThreadUtilities.sleep(1500);
@@ -238,7 +238,7 @@ public class TestExecutionPropertyRest {
System.setErr(stderr);
Response response = null;
response = client.target("http://localhost:32801/TestExecutionRest/apex/event/GetProperUrl")
- .request("application/json").get();
+ .request("application/json").get();
final String responseEntity = response.readEntity(String.class);
LOGGER.info("testReplaceUrlMultiTag-OUTSTRING=\n" + responseEntity + "\nEnd-MultiTagUrl");
assertTrue(responseEntity.contains("\"PostProperUrl\": 3"));
diff --git a/testsuites/integration/pom.xml b/testsuites/integration/pom.xml
index 685f8e1f9..a96d219e1 100644
--- a/testsuites/integration/pom.xml
+++ b/testsuites/integration/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.testsuites</groupId>
<artifactId>apex-testsuites</artifactId>
- <version>2.4.0-SNAPSHOT</version>
+ <version>2.4.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
diff --git a/testsuites/performance/performance-benchmark-test/pom.xml b/testsuites/performance/performance-benchmark-test/pom.xml
index d97bc06cd..e34ac84a4 100644
--- a/testsuites/performance/performance-benchmark-test/pom.xml
+++ b/testsuites/performance/performance-benchmark-test/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.testsuites.performance</groupId>
<artifactId>apex-performance</artifactId>
- <version>2.4.0-SNAPSHOT</version>
+ <version>2.4.1-SNAPSHOT</version>
</parent>
<artifactId>performance-benchmark-test</artifactId>
diff --git a/testsuites/performance/pom.xml b/testsuites/performance/pom.xml
index 2b38efc9b..19aa28807 100644
--- a/testsuites/performance/pom.xml
+++ b/testsuites/performance/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp.testsuites</groupId>
<artifactId>apex-testsuites</artifactId>
- <version>2.4.0-SNAPSHOT</version>
+ <version>2.4.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.testsuites.performance</groupId>
diff --git a/testsuites/pom.xml b/testsuites/pom.xml
index c00ff3a87..e5ab27c3e 100644
--- a/testsuites/pom.xml
+++ b/testsuites/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.policy.apex-pdp</groupId>
<artifactId>apex-pdp</artifactId>
- <version>2.4.0-SNAPSHOT</version>
+ <version>2.4.1-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.apex-pdp.testsuites</groupId>