summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-07-23 13:40:28 +0000
committerGerrit Code Review <gerrit@onap.org>2020-07-23 13:40:28 +0000
commit7d640cc3ababa6d076878dcb75411fc7ffe4b4d0 (patch)
treeae3f325b080f2ae008ad44855655318681f453ce /core
parent67ee67bd0da0d2d16abb982e26a3d48ba031a7e8 (diff)
parent1e80f98e25442b4badf570fd6ca652c21e499e28 (diff)
Merge "Remove try/catch blocks with assertj - apex-pdp"
Diffstat (limited to 'core')
-rw-r--r--core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/BatchDeployerTest.java4
-rw-r--r--core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/EngineServiceFacadeTest.java3
2 files changed, 5 insertions, 2 deletions
diff --git a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/BatchDeployerTest.java b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/BatchDeployerTest.java
index ab44f900d..7e17cacdc 100644
--- a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/BatchDeployerTest.java
+++ b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/BatchDeployerTest.java
@@ -78,7 +78,7 @@ public class BatchDeployerTest {
assertThatThrownBy(deployer::init).hasMessage("model deployment failed on parameters localhost 12345");
// Wait until the connection to the server closes following the bad connection
// attempt
- Awaitility.await().atLeast(Duration.ofMillis(100));
+ Awaitility.await().atLeast(Duration.ofMillis(500));
// We are testing towards a dummy client, make it return a successful initiation
dummyDeploymentClient.setInitSuccessful(true);
@@ -105,7 +105,7 @@ public class BatchDeployerTest {
.hasMessage("model deployment failed on parameters localhost 12345");
// Wait until the connection to the server closes following the bad connection
// attempt
- Awaitility.await().atLeast(Duration.ofMillis(100));
+ Awaitility.await().atLeast(Duration.ofMillis(500));
dummyDeploymentClient.setInitSuccessful(true);
diff --git a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/EngineServiceFacadeTest.java b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/EngineServiceFacadeTest.java
index 6e0826c3f..1740c7e55 100644
--- a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/EngineServiceFacadeTest.java
+++ b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/EngineServiceFacadeTest.java
@@ -27,6 +27,8 @@ import static org.junit.Assert.assertNull;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
+import java.time.Duration;
+import org.awaitility.Awaitility;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
@@ -54,6 +56,7 @@ public class EngineServiceFacadeTest {
.hasMessage("could not deploy apex model, deployer is not initialized");
// Second init should work
+ Awaitility.await().atLeast(Duration.ofMillis(1000));
dummyDeploymentClient.setInitSuccessful(true);
facade.init();