From 1ce041490b2b4aafb700c905b23d17037e42f153 Mon Sep 17 00:00:00 2001 From: jhh Date: Wed, 9 Feb 2022 21:09:30 -0600 Subject: transaction records cleanup Issue-ID: POLICY-3761 Signed-off-by: jhh Change-Id: Id842d8ca5773d0c1104ae387519375fb914bdf4f Signed-off-by: jhh --- .../org/onap/policy/controlloop/UsecasesTest.java | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'controlloop/common/controller-usecases/src/test') diff --git a/controlloop/common/controller-usecases/src/test/java/org/onap/policy/controlloop/UsecasesTest.java b/controlloop/common/controller-usecases/src/test/java/org/onap/policy/controlloop/UsecasesTest.java index ef40d302e..5077f8fb8 100644 --- a/controlloop/common/controller-usecases/src/test/java/org/onap/policy/controlloop/UsecasesTest.java +++ b/controlloop/common/controller-usecases/src/test/java/org/onap/policy/controlloop/UsecasesTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2020-2022 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -90,18 +90,23 @@ public class UsecasesTest extends DroolsRuleTest { String policyName = policy.getIdentifier().getName(); policyClMgt.await(notif -> notif.getNotification() == ControlLoopNotificationType.ACTIVE - && (policyName + ".EVENT.MANAGER.ACCEPT").equals(notif.getPolicyName())); + && "EVENT.MANAGER.ACCEPT".equals(notif.getPolicyScope()) + && policyName.equals(notif.getPolicyName())); policyClMgt.await(notif -> notif.getNotification() == ControlLoopNotificationType.OPERATION - && (policyName + ".EVENT.MANAGER.PROCESS.GUARD.OUTCOME").equals(notif.getPolicyName()) + && "EVENT.MANAGER.PROCESS.GUARD.OUTCOME".equals(notif.getPolicyScope()) + && policyName.equals(notif.getPolicyName()) && notif.getMessage().startsWith("Sending guard query")); policyClMgt.await(notif -> notif.getNotification() == ControlLoopNotificationType.OPERATION - && (policyName + ".EVENT.MANAGER.PROCESS.GUARD.OUTCOME").equals(notif.getPolicyName()) - && notif.getMessage().startsWith("Guard result") && notif.getMessage().endsWith("Permit")); + && "EVENT.MANAGER.PROCESS.GUARD.OUTCOME".equals(notif.getPolicyScope()) + && policyName.equals(notif.getPolicyName()) + && notif.getMessage().startsWith("Guard result") + && notif.getMessage().endsWith("Permit")); policyClMgt.await(notif -> notif.getNotification() == ControlLoopNotificationType.OPERATION - && (policyName + ".EVENT.MANAGER.PROCESS.POLICY.STARTED").equals(notif.getPolicyName()) + && "EVENT.MANAGER.PROCESS.POLICY.STARTED".equals(notif.getPolicyScope()) + && policyName.equals(notif.getPolicyName()) && notif.getMessage().startsWith("actor=")); } @@ -110,7 +115,8 @@ public class UsecasesTest extends DroolsRuleTest { Listener policyClMgt, ControlLoopNotificationType finalType) { return policyClMgt.await(notif -> notif.getNotification() == finalType - && (policy.getIdentifier().getName() + ".EVENT.MANAGER.FINAL").equals(notif.getPolicyName())); + && "EVENT.MANAGER.FINAL".equals(notif.getPolicyScope()) + && (policy.getIdentifier().getName()).equals(notif.getPolicyName())); } @Override -- cgit 1.2.3-korg