From 4a3bb35cf14f9eff17b2e2bc5f09514d298a0c35 Mon Sep 17 00:00:00 2001 From: jhh Date: Tue, 23 Feb 2021 13:32:38 -0600 Subject: rearrange asserts in DroolsRunnable tests There are consistent failures when doing staging builds in policy-core junits. This problem shows only in stage builds. It is suspected to be a race conditioning with the internal scheduling of rules and insertion of events. Issue-ID: POLICY-3097 Signed-off-by: jhh Change-Id: I0f2df770dfdda6d23e9cb29253f4152a0365d33a --- .../test/java/org/onap/policy/drools/core/DroolsContainerTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/policy-core/src/test/java/org/onap/policy/drools/core/DroolsContainerTest.java b/policy-core/src/test/java/org/onap/policy/drools/core/DroolsContainerTest.java index 939de08c..9fe5c708 100644 --- a/policy-core/src/test/java/org/onap/policy/drools/core/DroolsContainerTest.java +++ b/policy-core/src/test/java/org/onap/policy/drools/core/DroolsContainerTest.java @@ -188,9 +188,9 @@ public class DroolsContainerTest { final LinkedBlockingQueue lbq = new LinkedBlockingQueue<>(); executor.execute(() -> lbq.add("DroolsRunnable String")); - executor.execute(() -> lbq.add("another DroolsRunnable String")); - assertEquals("DroolsRunnable String", lbq.poll(TIMEOUT_SEC, TimeUnit.SECONDS)); + + executor.execute(() -> lbq.add("another DroolsRunnable String")); assertEquals("another DroolsRunnable String", lbq.poll(TIMEOUT_SEC, TimeUnit.SECONDS)); } finally { -- cgit 1.2.3-korg