From 718a1611a1e580ed7874088e1a0e013416334989 Mon Sep 17 00:00:00 2001 From: huaxing Date: Wed, 10 Jun 2020 14:58:34 +0800 Subject: Improve robustness of unit testing Issue-ID: POLICY-2630 Signed-off-by: huaxing Change-Id: I6475f9272c1a770836af537c13b23e486b66ac3e --- .../org/onap/policy/apex/examples/aadm/TestApexActionListener.java | 7 ------- 1 file changed, 7 deletions(-) (limited to 'examples') diff --git a/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestApexActionListener.java b/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestApexActionListener.java index 11a755653..00cf98a93 100644 --- a/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestApexActionListener.java +++ b/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestApexActionListener.java @@ -21,12 +21,8 @@ package org.onap.policy.apex.examples.aadm; -import static org.awaitility.Awaitility.await; - import java.util.ArrayList; import java.util.List; -import java.util.concurrent.TimeUnit; - import org.onap.policy.apex.core.engine.engine.EnEventListener; import org.onap.policy.apex.core.engine.event.EnEvent; @@ -58,7 +54,6 @@ public class TestApexActionListener implements EnEventListener { * @return the result */ public EnEvent getResult() { - await().atLeast(100, TimeUnit.MILLISECONDS).until(() -> !resultEvents.isEmpty()); return resultEvents.remove(0); } @@ -67,8 +62,6 @@ public class TestApexActionListener implements EnEventListener { */ @Override public void onEnEvent(final EnEvent actionEvent) { - await().atLeast(100, TimeUnit.MILLISECONDS).until(() -> actionEvent != null); - System.out.println("Action event from engine:" + actionEvent.getName()); resultEvents.add(actionEvent); } -- cgit 1.2.3-korg