aboutsummaryrefslogtreecommitdiffstats
path: root/testsuites/integration
diff options
context:
space:
mode:
authora.sreekumar <ajith.sreekumar@est.tech>2019-10-16 11:46:21 +0100
committerAjith Sreekumar <ajith.sreekumar@est.tech>2019-11-01 08:49:37 +0000
commit82da1e9fa73e6a19455ea979bbf084aeed43af90 (patch)
tree88efd6fe5317262d894f8945c39ec431748bfca8 /testsuites/integration
parentc03a0455e2956e43e425d6f4121ab5d8d20158f1 (diff)
Resolve mapping between TOSCA policies and APEX policy models
Change-Id: Ifaedc5074bcc51a5d495e342feae89b6a2aac1cf Issue-ID: POLICY-1626 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
Diffstat (limited to 'testsuites/integration')
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestExecutionPropertyRest.java17
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestFile2Rest.java29
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestRest2File.java23
3 files changed, 33 insertions, 36 deletions
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 b61c70961..f3ce83c5a 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
@@ -20,6 +20,13 @@
package org.onap.policy.apex.testsuites.integration.uservice.adapt.restclient;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.ClientBuilder;
+import javax.ws.rs.core.Response;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
@@ -34,14 +41,6 @@ import org.onap.policy.common.utils.network.NetworkUtil;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.ClientBuilder;
-import javax.ws.rs.core.Response;
-import java.io.ByteArrayOutputStream;
-import java.io.PrintStream;
-
-import static org.junit.Assert.assertTrue;
-
/**
* This class runs integration tests for execution property in restClient.
*/
@@ -97,7 +96,7 @@ public class TestExecutionPropertyRest {
server.start();
- if (!NetworkUtil.isTcpPortOpen("localHost", PORT, 2000, 1L)) {
+ if (!NetworkUtil.isTcpPortOpen("localHost", PORT, 60, 500L)) {
throw new IllegalStateException("port " + PORT + " is still not in use");
}
diff --git a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestFile2Rest.java b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestFile2Rest.java
index 534d4bcf6..6393f3f04 100644
--- a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestFile2Rest.java
+++ b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestFile2Rest.java
@@ -6,22 +6,32 @@
* 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.uservice.adapt.restclient;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
import com.google.gson.Gson;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.Map;
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.ClientBuilder;
+import javax.ws.rs.core.Response;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
@@ -37,17 +47,6 @@ import org.onap.policy.common.utils.network.NetworkUtil;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.ClientBuilder;
-import javax.ws.rs.core.Response;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.Map;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
/**
* The Class TestFile2Rest.
*/
@@ -79,7 +78,7 @@ public class TestFile2Rest {
server.start();
- if (!NetworkUtil.isTcpPortOpen("localHost", PORT, 2000, 1L)) {
+ if (!NetworkUtil.isTcpPortOpen("localHost", PORT, 60, 500L)) {
throw new IllegalStateException("port " + PORT + " is still not in use");
}
}
diff --git a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestRest2File.java b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestRest2File.java
index c44950b9e..5dd2f0546 100644
--- a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestRest2File.java
+++ b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/restclient/TestRest2File.java
@@ -6,21 +6,27 @@
* 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.uservice.adapt.restclient;
+import static org.junit.Assert.fail;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintStream;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
@@ -37,13 +43,6 @@ import org.onap.policy.common.utils.network.NetworkUtil;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintStream;
-
-import static org.junit.Assert.fail;
-
/**
* The Class TestRest2File.
*/
@@ -83,7 +82,7 @@ public class TestRest2File {
server.start();
- if (!NetworkUtil.isTcpPortOpen("localHost", PORT, 2000, 1L)) {
+ if (!NetworkUtil.isTcpPortOpen("localHost", PORT, 60, 500L)) {
throw new IllegalStateException("port " + PORT + " is still not in use");
}
}
@@ -268,7 +267,7 @@ public class TestRest2File {
/**
* Check if a required string exists in the output.
- *
+ *
* @param outputEventText the text to examine
* @param requiredString the string to search for
*/