diff options
author | adheli.tavares <adheli.tavares@est.tech> | 2024-01-12 16:16:40 +0000 |
---|---|---|
committer | adheli.tavares <adheli.tavares@est.tech> | 2024-01-12 17:16:33 +0000 |
commit | b0455b141643f18d5025e23ac7859da43afe7f19 (patch) | |
tree | da7cc16a63f151fd3b56b669d7d7028f4be2f620 /controlloop/common/rules-test/src | |
parent | a3656927acce14878d77d3f7afa165121bc01347 (diff) |
Fix topic lower case for kafka compability
Issue-ID: POLICY-4402
Change-Id: I0598bc83b5f4d46c79d7c5c897fd1e6e253b9238
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'controlloop/common/rules-test/src')
2 files changed, 13 insertions, 17 deletions
diff --git a/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java b/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java index c2e10dff6..321938240 100644 --- a/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java +++ b/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java @@ -3,7 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2020-2022 AT&T Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2023 Nordix Foundation. + * Modifications Copyright (C) 2023-2024 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,7 +29,6 @@ import java.util.Map; import java.util.UUID; import java.util.concurrent.TimeUnit; import java.util.function.Supplier; -import java.util.stream.Collectors; import java.util.stream.Stream; import lombok.AccessLevel; import lombok.Getter; @@ -66,15 +65,15 @@ public abstract class BaseTest { /* * Canonical Topic Names. */ - protected static final String DCAE_TOPIC = "DCAE_TOPIC"; - protected static final String APPC_LCM_WRITE_TOPIC = "APPC-LCM-WRITE"; - protected static final String POLICY_CL_MGT_TOPIC = "POLICY-CL-MGT"; - protected static final String APPC_LCM_READ_TOPIC = "APPC-LCM-READ"; - protected static final String APPC_CL_TOPIC = "APPC-CL"; - protected static final String SDNR_CL_TOPIC = "SDNR-CL"; - protected static final String SDNR_CL_RSP_TOPIC = "SDNR-CL-RSP"; - protected static final String A1P_CL_TOPIC = "A1-P"; - protected static final String A1P_CL_RSP_TOPIC = "A1-P-RSP"; + protected static final String DCAE_TOPIC = "dcae_topic"; + protected static final String APPC_LCM_WRITE_TOPIC = "appc-lcm-write"; + protected static final String POLICY_CL_MGT_TOPIC = "policy-cl-mgt"; + protected static final String APPC_LCM_READ_TOPIC = "appc-lcm-read"; + protected static final String APPC_CL_TOPIC = "appc-cl"; + protected static final String SDNR_CL_TOPIC = "sdnr-cl"; + protected static final String SDNR_CL_RSP_TOPIC = "sdnr-cl-rsp"; + protected static final String A1P_CL_TOPIC = "a1-p"; + protected static final String A1P_CL_RSP_TOPIC = "a1-p-rsp"; /* * Constants for each test case. @@ -289,7 +288,7 @@ public abstract class BaseTest { // get the list of target names, so we can ensure there's one of each List<String> actual = Stream.of(notif1, notif2).map(notif -> notif.getAai().get("generic-vnf.vnf-id")) - .sorted().collect(Collectors.toList()); + .sorted().toList(); assertEquals(List.of("duplicate-VNF", "vCPE_Infrastructure_vGMUX_demo_app").toString(), actual.toString()); diff --git a/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/Rules.java b/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/Rules.java index 8272205d2..05d037e91 100644 --- a/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/Rules.java +++ b/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/Rules.java @@ -3,7 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2020-2022 AT&T Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2023 Nordix Foundation. + * Modifications Copyright (C) 2023-2024 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -71,6 +71,7 @@ import org.slf4j.LoggerFactory; /** * Mechanism by which junit tests can manage the rule engine. */ +@Getter public class Rules { private static final Logger logger = LoggerFactory.getLogger(Rules.class); private static final StandardCoder coder = new StandardCoder(); @@ -79,20 +80,16 @@ public class Rules { /** * PDP-D Engine. */ - @Getter private final PolicyEngine pdpd = makeEngine(); /** * PDP-D Configuration Repository. */ - @Getter private final SystemPersistence pdpdRepo = makePdpdRepo(); - @Getter private final String controllerName; - @Getter private PolicyController controller; |