From 25d3e43f27fb4d055af69c6934f3531fef115a02 Mon Sep 17 00:00:00 2001 From: "Hockla, Ali (ah999m)" Date: Wed, 15 Jan 2020 15:04:09 -0600 Subject: policy/drools-apps jdk11 upgrades Issue-ID: POLICY-1587 Change-Id: I02bef6c829f2f24954ae73fb0c540ab7198775ce Signed-off-by: Hockla, Ali (ah999m) --- checkstyle-suppressions.xml | 33 +++++++++++++++ controlloop/common/coordination/pom.xml | 4 +- controlloop/common/database/pom.xml | 5 +-- controlloop/common/eventmanager/pom.xml | 6 +-- .../controlloop/utils/ControlLoopUtilsTest.java | 2 +- .../common/feature-controlloop-management/pom.xml | 9 +--- .../common/feature-controlloop-trans/pom.xml | 9 +--- .../trans/ControlLoopMetricsFeatureTest.java | 24 +++++------ .../feature/utils/ControlLoopUtilsFeatureTest.java | 4 +- controlloop/common/guard/pom.xml | 3 +- .../org/onap/policy/guard/GuardResultTest.java | 3 +- .../onap/policy/guard/PolicyGuardRequestTest.java | 4 +- .../onap/policy/guard/PolicyGuardResponseTest.java | 4 +- .../PolicyGuardXacmlRequestAttributesTest.java | 4 +- controlloop/m2/appclcm/pom.xml | 2 +- .../appclcm/AppcLcmHealthCheckOperationTest.java | 16 ++++---- .../test/java/appclcm/AppcLcmOperationTest.java | 48 +++++++++++----------- controlloop/m2/base/pom.xml | 2 +- .../java/org/onap/policy/m2/base/Operation.java | 3 +- .../java/org/onap/policy/m2/base/Transaction.java | 6 ++- .../onap/policy/m2/base/ActorOperationTest.java | 2 +- .../org/onap/policy/m2/base/GuardAdjunctTest.java | 4 +- .../org/onap/policy/m2/base/TransactionTest.java | 18 ++++---- .../java/org/onap/policy/m2/base/UtilTest.java | 4 +- controlloop/m2/guard/pom.xml | 1 - .../org/onap/policy/guard/GuardContextTest.java | 6 +-- .../policy/drools/m2/lock/LockAdjunctTest.java | 2 +- .../java/org/onap/policy/m2/test/SimDmaap.java | 4 +- .../test/java/org/onap/policy/m2/test/Util.java | 8 ++-- .../template/demo/CcvpnBwControlLoopTest.java | 6 +-- .../policy/template/demo/CcvpnControlLoopTest.java | 6 +-- .../policy/template/demo/VcpeControlLoopTest.java | 9 ++-- .../template/demo/VdnsControlLoopCqTest.java | 6 +-- .../policy/template/demo/VdnsControlLoopTest.java | 8 ++-- .../policy/template/demo/VfcControlLoopTest.java | 6 +-- .../template/demo/VfwControlLoopCdsTest.java | 3 +- .../policy/template/demo/VfwControlLoopTest.java | 9 ++-- .../policy/template/demo/VpciControlLoopTest.java | 6 +-- .../policy/template/demo/VsonhControlLoopTest.java | 6 +-- pom.xml | 19 +++------ 40 files changed, 174 insertions(+), 150 deletions(-) create mode 100644 checkstyle-suppressions.xml diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml new file mode 100644 index 000000000..ee01ae5ae --- /dev/null +++ b/checkstyle-suppressions.xml @@ -0,0 +1,33 @@ + + + + + + + + diff --git a/controlloop/common/coordination/pom.xml b/controlloop/common/coordination/pom.xml index 076637ad9..502dd4edb 100644 --- a/controlloop/common/coordination/pom.xml +++ b/controlloop/common/coordination/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= drools-applications ================================================================================ - Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2019-2020 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. @@ -63,7 +63,7 @@ with minor changes --> onap-checkstyle/onap-java-style.xml - ${project.build.sourceDirectory} + ${project.build.sourceDirectory} true true true diff --git a/controlloop/common/database/pom.xml b/controlloop/common/database/pom.xml index e76a18fcc..a829d9f7b 100644 --- a/controlloop/common/database/pom.xml +++ b/controlloop/common/database/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= drools-applications ================================================================================ - Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2019-2020 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. @@ -64,7 +64,6 @@ org.mockito mockito-core - 2.13.0 test @@ -85,7 +84,7 @@ with minor changes --> onap-checkstyle/onap-java-style.xml - ${project.build.sourceDirectory} + ${project.build.sourceDirectory} true true true diff --git a/controlloop/common/eventmanager/pom.xml b/controlloop/common/eventmanager/pom.xml index a020e5e5d..a04264958 100644 --- a/controlloop/common/eventmanager/pom.xml +++ b/controlloop/common/eventmanager/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= eventmanager ================================================================================ - Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved. Modifications Copyright (C) 2019 Nordix Foundation. Modifications Copyright (C) 2019 Bell Canada. ================================================================================ @@ -155,7 +155,7 @@ org.powermock - powermock-api-mockito + powermock-api-mockito2 test @@ -238,7 +238,7 @@ with minor changes --> onap-checkstyle/onap-java-style.xml - ${project.build.sourceDirectory} + ${project.build.sourceDirectory} true true true diff --git a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/utils/ControlLoopUtilsTest.java b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/utils/ControlLoopUtilsTest.java index ad83b7730..2c26517cd 100644 --- a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/utils/ControlLoopUtilsTest.java +++ b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/utils/ControlLoopUtilsTest.java @@ -33,7 +33,7 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy; public class ControlLoopUtilsTest { @Test - public void toControlLoopParams() throws Exception { + public void testToControlLoopParams() throws Exception { String policy = new String(Files.readAllBytes(Paths.get("src/test/resources/tosca-policy-operational-restart.json"))); diff --git a/controlloop/common/feature-controlloop-management/pom.xml b/controlloop/common/feature-controlloop-management/pom.xml index 24f7a1792..e75d78e3d 100644 --- a/controlloop/common/feature-controlloop-management/pom.xml +++ b/controlloop/common/feature-controlloop-management/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= ONAP ================================================================================ - Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2018-2020 AT&T Intellectual Property. All rights reserved. Modifications Copyright (C) 2019 Nordix Foundation. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); @@ -34,11 +34,6 @@ Extensions to the PDP-D to improve control loop specific management capabilities. - - 1.8 - 1.8 - - @@ -294,7 +289,7 @@ org.powermock - powermock-api-mockito + powermock-api-mockito2 test diff --git a/controlloop/common/feature-controlloop-trans/pom.xml b/controlloop/common/feature-controlloop-trans/pom.xml index 4559d391c..fb60926aa 100644 --- a/controlloop/common/feature-controlloop-trans/pom.xml +++ b/controlloop/common/feature-controlloop-trans/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= ONAP ================================================================================ - Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2018-2020 AT&T Intellectual Property. All rights reserved. Modifications Copyright (C) 2019 Nordix Foundation. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); @@ -34,11 +34,6 @@ Loadable PDP-D feature module to track control loop transactions - - 1.8 - 1.8 - - @@ -99,7 +94,7 @@ with minor changes --> onap-checkstyle/onap-java-style.xml - ${project.build.sourceDirectory} + ${project.build.sourceDirectory} true true true diff --git a/controlloop/common/feature-controlloop-trans/src/test/java/org/onap/policy/drools/apps/controlloop/feature/trans/ControlLoopMetricsFeatureTest.java b/controlloop/common/feature-controlloop-trans/src/test/java/org/onap/policy/drools/apps/controlloop/feature/trans/ControlLoopMetricsFeatureTest.java index b416736ab..b713e8e8f 100644 --- a/controlloop/common/feature-controlloop-trans/src/test/java/org/onap/policy/drools/apps/controlloop/feature/trans/ControlLoopMetricsFeatureTest.java +++ b/controlloop/common/feature-controlloop-trans/src/test/java/org/onap/policy/drools/apps/controlloop/feature/trans/ControlLoopMetricsFeatureTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018-2020 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. @@ -65,29 +65,29 @@ public class ControlLoopMetricsFeatureTest { } @Test - public void cacheDefaults() { + public void testCacheDefaults() { assertEquals(3, ControlLoopMetricsManager.getManager().getCacheSize()); assertEquals(2, ControlLoopMetricsManager.getManager().getTransactionTimeout()); assertEquals(0, ControlLoopMetricsManager.getManager().getCacheOccupancy()); } @Test - public void invalidNotifications() { + public void testInvalidNotifications() { ControlLoopMetricsFeature feature = new ControlLoopMetricsFeature(); VirtualControlLoopNotification notification = new VirtualControlLoopNotification(); feature.beforeDeliver(testController, CommInfrastructure.DMAAP, POLICY_CL_MGT, notification); - this.cacheDefaults(); + this.testCacheDefaults(); UUID requestId = UUID.randomUUID(); notification.setRequestId(requestId); feature.beforeDeliver(testController, CommInfrastructure.DMAAP, POLICY_CL_MGT, notification); assertNull(ControlLoopMetricsManager.getManager().getTransaction(requestId)); - this.cacheDefaults(); + this.testCacheDefaults(); } @Test - public void validActiveNotification() throws InterruptedException { + public void testValidActiveNotification() throws InterruptedException { ControlLoopMetricsFeature feature = new ControlLoopMetricsFeature(); VirtualControlLoopNotification notification = new VirtualControlLoopNotification(); UUID requestId = UUID.randomUUID(); @@ -105,11 +105,11 @@ public class ControlLoopMetricsFeatureTest { await().atMost(ControlLoopMetricsManager.getManager().getTransactionTimeout() + 1, TimeUnit.SECONDS) .until(() -> ControlLoopMetricsManager.getManager().getTransaction(requestId) == null); - this.cacheDefaults(); + this.testCacheDefaults(); } @Test - public void reset() { + public void testReset() { VirtualControlLoopNotification notification = this.generateNotification(); new ControlLoopMetricsFeature().beforeDeliver(testController, CommInfrastructure.DMAAP, POLICY_CL_MGT, notification); @@ -119,11 +119,11 @@ public class ControlLoopMetricsFeatureTest { ControlLoopMetricsManager.getManager().resetCache(ControlLoopMetricsManager.getManager().getCacheSize(), ControlLoopMetricsManager.getManager().getTransactionTimeout()); assertNull(ControlLoopMetricsManager.getManager().getTransaction(notification.getRequestId())); - this.cacheDefaults(); + this.testCacheDefaults(); } @Test - public void removeTransaction() { + public void testRemoveTransaction() { VirtualControlLoopNotification notification = this.generateNotification(); assertNull(ControlLoopMetricsManager.getManager().getTransaction(notification.getRequestId())); ControlLoopMetricsManager.getManager().removeTransaction(notification.getRequestId()); @@ -135,7 +135,7 @@ public class ControlLoopMetricsFeatureTest { } @Test - public void eviction() throws InterruptedException { + public void testEviction() throws InterruptedException { ControlLoopMetricsFeature feature = new ControlLoopMetricsFeature(); for (int i = 0; i < ControlLoopMetricsManager.getManager().getCacheSize(); i++) { VirtualControlLoopNotification notification = generateNotification(); @@ -170,7 +170,7 @@ public class ControlLoopMetricsFeatureTest { assertTrue(ControlLoopMetricsManager.getManager().getTransactionIds().isEmpty()); assertTrue(ControlLoopMetricsManager.getManager().getTransactions().isEmpty()); - this.cacheDefaults(); + this.testCacheDefaults(); } private VirtualControlLoopNotification generateNotification() { diff --git a/controlloop/common/feature-controlloop-utils/src/test/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeatureTest.java b/controlloop/common/feature-controlloop-utils/src/test/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeatureTest.java index 3999797a9..e2bdf1b2d 100644 --- a/controlloop/common/feature-controlloop-utils/src/test/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeatureTest.java +++ b/controlloop/common/feature-controlloop-utils/src/test/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeatureTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2020 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. @@ -34,7 +34,7 @@ import org.onap.policy.simulators.Util; public class ControlLoopUtilsFeatureTest { @Test - public void simulate() { + public void testSimulate() { LoggerUtil.setLevel("ROOT", "INFO"); LoggerUtil.setLevel("org.eclipse.jetty", "WARN"); final ControlLoopUtilsFeature feature = new ControlLoopUtilsFeature(); diff --git a/controlloop/common/guard/pom.xml b/controlloop/common/guard/pom.xml index e41c494e2..c8d865707 100644 --- a/controlloop/common/guard/pom.xml +++ b/controlloop/common/guard/pom.xml @@ -130,7 +130,6 @@ org.mockito mockito-core - 2.13.0 test @@ -156,7 +155,7 @@ with minor changes --> onap-checkstyle/onap-java-style.xml - ${project.build.sourceDirectory} + ${project.build.sourceDirectory} true true true diff --git a/controlloop/common/guard/src/test/java/org/onap/policy/guard/GuardResultTest.java b/controlloop/common/guard/src/test/java/org/onap/policy/guard/GuardResultTest.java index a491d74cc..6fe0f2b50 100644 --- a/controlloop/common/guard/src/test/java/org/onap/policy/guard/GuardResultTest.java +++ b/controlloop/common/guard/src/test/java/org/onap/policy/guard/GuardResultTest.java @@ -3,6 +3,7 @@ * guard * ================================================================================ * Copyright (C) 2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 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. @@ -28,7 +29,7 @@ import org.junit.Test; public class GuardResultTest { @Test - public void guardResultTest() { + public void testGuardResult() { assertEquals(3, GuardResult.values().length); assertNotNull(GuardResult.LOCK_ACQUIRED); assertNotNull(GuardResult.LOCK_DENIED); diff --git a/controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardRequestTest.java b/controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardRequestTest.java index 2be0e06ec..3d64e90d0 100644 --- a/controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardRequestTest.java +++ b/controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardRequestTest.java @@ -4,7 +4,7 @@ * ================================================================================ * Copyright (C) 2018 Ericsson. All rights reserved. * ================================================================================ - * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2019-2020 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. @@ -36,7 +36,7 @@ public class PolicyGuardRequestTest { private static final String DOROTHY = "Dorothy"; @Test - public void policyGuardRequestTest() { + public void testPolicyGuardRequest() { UUID requestId = UUID.randomUUID(); assertNotNull(new PolicyGuardRequest(null, null, null, null)); diff --git a/controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardResponseTest.java b/controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardResponseTest.java index 14e7a3ad0..32ca7a240 100644 --- a/controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardResponseTest.java +++ b/controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardResponseTest.java @@ -4,7 +4,7 @@ * ================================================================================ * Copyright (C) 2018 Ericsson. All rights reserved. * ================================================================================ - * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2019-2020 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. @@ -35,7 +35,7 @@ public class PolicyGuardResponseTest { private static final String BACK_HOME = "BackHome"; @Test - public void policyGuardResponseTest() { + public void testPolicyGuardResponse() { UUID requestId = UUID.randomUUID(); assertNotNull(new PolicyGuardResponse(null, null, null)); diff --git a/controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardXacmlRequestAttributesTest.java b/controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardXacmlRequestAttributesTest.java index b4f8c443a..79e52e761 100644 --- a/controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardXacmlRequestAttributesTest.java +++ b/controlloop/common/guard/src/test/java/org/onap/policy/guard/PolicyGuardXacmlRequestAttributesTest.java @@ -4,7 +4,7 @@ * ================================================================================ * Copyright (C) 2018 Ericsson. All rights reserved. * ================================================================================ - * Modifications Copyright (C) 2018-2019 AT&T. All rights reserved. + * Modifications Copyright (C) 2018-2020 AT&T. 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. @@ -32,7 +32,7 @@ import org.junit.Test; public class PolicyGuardXacmlRequestAttributesTest { @Test - public void policyGuardXacmlRequestAttributesTest() { + public void testPolicyGuardXacmlRequestAttributes() { PolicyGuardXacmlRequestAttributes attributes = new PolicyGuardXacmlRequestAttributes(null, null, null, null, null, null); assertNotNull(attributes); diff --git a/controlloop/m2/appclcm/pom.xml b/controlloop/m2/appclcm/pom.xml index 78200454a..8c4ff9068 100644 --- a/controlloop/m2/appclcm/pom.xml +++ b/controlloop/m2/appclcm/pom.xml @@ -72,7 +72,7 @@ org.powermock - powermock-api-mockito + powermock-api-mockito2 test diff --git a/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmHealthCheckOperationTest.java b/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmHealthCheckOperationTest.java index 0748b6ee0..5f436c2d4 100644 --- a/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmHealthCheckOperationTest.java +++ b/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmHealthCheckOperationTest.java @@ -111,7 +111,7 @@ public class AppcLcmHealthCheckOperationTest { } @Test - public void getVnfHealthCheckRequestTest() throws ControlLoopException { + public void testGetVnfHealthCheckRequest() throws ControlLoopException { policy.setRecipe("HEALTHCHECK"); policy.getTarget().setType(TargetType.VNF); @@ -141,7 +141,7 @@ public class AppcLcmHealthCheckOperationTest { } @Test - public void incomingHealthCheckMessageHealthyStateTest() { + public void testIncomingHealthCheckMessageHealthyState() { policy.setRecipe("HEALTHCHECK"); policy.getTarget().setType(TargetType.VNF); operation = new AppcLcmHealthCheckOperation(transaction, policy, event, 1); @@ -160,7 +160,7 @@ public class AppcLcmHealthCheckOperationTest { } @Test - public void incomingHealthCheckMessageUnhealthyStateTest() { + public void testIncomingHealthCheckMessageUnhealthyState() { policy.setRecipe("HEALTHCHECK"); policy.getTarget().setType(TargetType.VNF); operation = new AppcLcmHealthCheckOperation(transaction, policy, event, 1); @@ -181,7 +181,7 @@ public class AppcLcmHealthCheckOperationTest { } @Test - public void incomingHealthCheckMessageUnknownStateTest() { + public void testIncomingHealthCheckMessageUnknownState() { policy.setRecipe("HEALTHCHECK"); policy.getTarget().setType(TargetType.VNF); operation = new AppcLcmHealthCheckOperation(transaction, policy, event, 1); @@ -202,7 +202,7 @@ public class AppcLcmHealthCheckOperationTest { } @Test - public void incomingHealthCheckMessageNoStateTest() { + public void testIncomingHealthCheckMessageNoState() { policy.setRecipe("HEALTHCHECK"); policy.getTarget().setType(TargetType.VNF); operation = new AppcLcmHealthCheckOperation(transaction, policy, event, 1); @@ -223,7 +223,7 @@ public class AppcLcmHealthCheckOperationTest { } @Test - public void incomingHealthCheckMessageUnsuccessfulTest() { + public void testIncomingHealthCheckMessageUnsuccessful() { policy.setRecipe("HEALTHCHECK"); policy.getTarget().setType(TargetType.VNF); operation = new AppcLcmHealthCheckOperation(transaction, policy, event, 1); @@ -244,7 +244,7 @@ public class AppcLcmHealthCheckOperationTest { } @Test - public void incomingHealthCheckMessageNoPayloadTest() { + public void testIncomingHealthCheckMessageNoPayload() { policy.setRecipe("HEALTHCHECK"); policy.getTarget().setType(TargetType.VNF); operation = new AppcLcmHealthCheckOperation(transaction, policy, event, 1); @@ -262,7 +262,7 @@ public class AppcLcmHealthCheckOperationTest { } @Test - public void incomingHealthCheckMessageEmptyPayloadTest() { + public void testIncomingHealthCheckMessageEmptyPayload() { policy.setRecipe("HEALTHCHECK"); policy.getTarget().setType(TargetType.VNF); operation = new AppcLcmHealthCheckOperation(transaction, policy, event, 1); diff --git a/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmOperationTest.java b/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmOperationTest.java index 0ddfb5b2c..6611a9da2 100644 --- a/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmOperationTest.java +++ b/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmOperationTest.java @@ -114,7 +114,7 @@ public class AppcLcmOperationTest { } @Test - public void getVmRestartRequestTest() throws ControlLoopException { + public void testGetVmRestartRequest() throws ControlLoopException { policy.setRecipe("RESTART"); policy.getTarget().setType(TargetType.VM); @@ -144,7 +144,7 @@ public class AppcLcmOperationTest { } @Test - public void getVnfRestartRequestTest() throws ControlLoopException { + public void testGetVnfRestartRequest() throws ControlLoopException { policy.setRecipe("RESTART"); policy.getTarget().setType(TargetType.VNF); @@ -174,7 +174,7 @@ public class AppcLcmOperationTest { } @Test - public void getVmRebuildRequestTest() throws ControlLoopException { + public void testGetVmRebuildRequest() throws ControlLoopException { policy.setRecipe("REBUILD"); policy.getTarget().setType(TargetType.VM); @@ -204,7 +204,7 @@ public class AppcLcmOperationTest { } @Test - public void getVnfRebuildRequestTest() throws ControlLoopException { + public void testGetVnfRebuildRequest() throws ControlLoopException { policy.setRecipe("REBUILD"); policy.getTarget().setType(TargetType.VNF); @@ -234,7 +234,7 @@ public class AppcLcmOperationTest { } @Test - public void getVmMigrateRequestTest() throws ControlLoopException { + public void testGetVmMigrateRequest() throws ControlLoopException { policy.setRecipe("MIGRATE"); policy.getTarget().setType(TargetType.VM); @@ -264,7 +264,7 @@ public class AppcLcmOperationTest { } @Test - public void getVnfMigrateRequestTest() throws ControlLoopException { + public void testGetVnfMigrateRequest() throws ControlLoopException { policy.setRecipe("MIGRATE"); policy.getTarget().setType(TargetType.VNF); @@ -294,7 +294,7 @@ public class AppcLcmOperationTest { } @Test - public void getVmEvacuateRequestTest() throws ControlLoopException { + public void testGetVmEvacuateRequest() throws ControlLoopException { policy.setRecipe("EVACUATE"); policy.getTarget().setType(TargetType.VM); @@ -324,7 +324,7 @@ public class AppcLcmOperationTest { } @Test - public void getVnfEvacuateRequestTest() throws ControlLoopException { + public void testGetVnfEvacuateRequest() throws ControlLoopException { policy.setRecipe("EVACUATE"); policy.getTarget().setType(TargetType.VNF); @@ -354,7 +354,7 @@ public class AppcLcmOperationTest { } @Test - public void getVmRebootRequestTest() throws ControlLoopException { + public void testGetVmRebootRequest() throws ControlLoopException { policy.setRecipe("REBOOT"); policy.getTarget().setType(TargetType.VM); @@ -386,7 +386,7 @@ public class AppcLcmOperationTest { } @Test - public void getVnfRebootRequestTest() throws ControlLoopException { + public void testGetVnfRebootRequest() throws ControlLoopException { policy.setRecipe("REBOOT"); policy.getTarget().setType(TargetType.VNF); @@ -418,7 +418,7 @@ public class AppcLcmOperationTest { } @Test - public void getVnfStartRequestTest() throws ControlLoopException { + public void testGetVnfStartRequest() throws ControlLoopException { policy.setRecipe("START"); policy.getTarget().setType(TargetType.VNF); @@ -448,7 +448,7 @@ public class AppcLcmOperationTest { } @Test - public void getVmStartRequestTest() throws ControlLoopException { + public void testGetVmStartRequest() throws ControlLoopException { policy.setRecipe("START"); policy.getTarget().setType(TargetType.VM); @@ -478,7 +478,7 @@ public class AppcLcmOperationTest { } @Test - public void getVnfStopRequestTest() throws ControlLoopException { + public void testGetVnfStopRequest() throws ControlLoopException { policy.setRecipe("STOP"); policy.getTarget().setType(TargetType.VNF); @@ -508,7 +508,7 @@ public class AppcLcmOperationTest { } @Test - public void getVmStopRequestTest() throws ControlLoopException { + public void testGetVmStopRequest() throws ControlLoopException { policy.setRecipe("STOP"); policy.getTarget().setType(TargetType.VM); @@ -546,7 +546,7 @@ public class AppcLcmOperationTest { */ @Test - public void incomingVmSuccessMessageTest() { + public void testIncomingVmSuccessMessage() { policy.setRecipe("RESTART"); policy.getTarget().setType(TargetType.VM); operation = new AppcLcmOperation(transaction, policy, event, 1); @@ -559,7 +559,7 @@ public class AppcLcmOperationTest { } @Test - public void incomingVnfSuccessMessageTest() { + public void testIncomingVnfSuccessMessage() { policy.setRecipe("RESTART"); policy.getTarget().setType(TargetType.VNF); operation = new AppcLcmOperation(transaction, policy, event, 1); @@ -580,7 +580,7 @@ public class AppcLcmOperationTest { } @Test - public void incomingVmFailureMessageTest() { + public void testIncomingVmFailureMessage() { policy.setRecipe("RESTART"); policy.getTarget().setType(TargetType.VM); operation = new AppcLcmOperation(transaction, policy, event, 1); @@ -593,7 +593,7 @@ public class AppcLcmOperationTest { } @Test - public void incomingAllVnfFailureMessageTest() { + public void testIncomingAllVnfFailureMessage() { policy.setRecipe("RESTART"); policy.getTarget().setType(TargetType.VNF); operation = new AppcLcmOperation(transaction, policy, event, 1); @@ -616,7 +616,7 @@ public class AppcLcmOperationTest { } @Test - public void incomingPartialVnfFailureMessageTest() { + public void testIncomingPartialVnfFailureMessage() { policy.setRecipe("RESTART"); policy.getTarget().setType(TargetType.VNF); operation = new AppcLcmOperation(transaction, policy, event, 1); @@ -657,7 +657,7 @@ public class AppcLcmOperationTest { */ @Test - public void validAaiSubtagTest() { + public void testValidAaiSubtag() { transaction.setNotificationMessage(null); VirtualControlLoopEvent validEvent = new VirtualControlLoopEvent(); validEvent.setTarget("vserver.vserver-name"); @@ -668,7 +668,7 @@ public class AppcLcmOperationTest { } @Test - public void noAaiSubtagTest() { + public void testNoAaiSubtag() { transaction.setNotificationMessage(null); VirtualControlLoopEvent noAaiTag = new VirtualControlLoopEvent(); noAaiTag.setAai(null); @@ -677,7 +677,7 @@ public class AppcLcmOperationTest { } @Test - public void noClosedLoopDisabledInAaiTest() { + public void testNoClosedLoopDisabledInAai() { transaction.setNotificationMessage(null); VirtualControlLoopEvent invalidEvent = new VirtualControlLoopEvent(); assertFalse(AppcLcmOperation.isAaiValid(transaction, invalidEvent)); @@ -686,7 +686,7 @@ public class AppcLcmOperationTest { } @Test - public void closedLoopDisabledInAaiTest() { + public void testClosedLoopDisabledInAai() { transaction.setNotificationMessage(null); VirtualControlLoopEvent invalidEvent = new VirtualControlLoopEvent(); invalidEvent.getAai().put(AppcLcmOperation.DCAE_CLOSEDLOOP_DISABLED_FIELD, "true"); @@ -696,7 +696,7 @@ public class AppcLcmOperationTest { } @Test - public void targetMismatchInAaiTest() { + public void testTargetMismatchInAai() { transaction.setNotificationMessage(null); VirtualControlLoopEvent validEvent = new VirtualControlLoopEvent(); validEvent.setTarget("vserver.vserver-name"); diff --git a/controlloop/m2/base/pom.xml b/controlloop/m2/base/pom.xml index e59025cd7..02df1ee66 100644 --- a/controlloop/m2/base/pom.xml +++ b/controlloop/m2/base/pom.xml @@ -85,7 +85,7 @@ org.powermock - powermock-api-mockito + powermock-api-mockito2 test diff --git a/controlloop/m2/base/src/main/java/org/onap/policy/m2/base/Operation.java b/controlloop/m2/base/src/main/java/org/onap/policy/m2/base/Operation.java index 5ca62fa82..ec5ab8ef6 100644 --- a/controlloop/m2/base/src/main/java/org/onap/policy/m2/base/Operation.java +++ b/controlloop/m2/base/src/main/java/org/onap/policy/m2/base/Operation.java @@ -121,5 +121,6 @@ public interface Operation extends Serializable { * * @param histEntry the history entry for this particular operation */ - default void histEntryCompleted(ControlLoopOperation histEntry) {} + default void histEntryCompleted(ControlLoopOperation histEntry) { + } } diff --git a/controlloop/m2/base/src/main/java/org/onap/policy/m2/base/Transaction.java b/controlloop/m2/base/src/main/java/org/onap/policy/m2/base/Transaction.java index 65bff684d..e92f6a234 100644 --- a/controlloop/m2/base/src/main/java/org/onap/policy/m2/base/Transaction.java +++ b/controlloop/m2/base/src/main/java/org/onap/policy/m2/base/Transaction.java @@ -647,14 +647,16 @@ public class Transaction implements Serializable { * * @param transaction the transaction containing the adjunct */ - public default void init(Transaction transaction) {} + public default void init(Transaction transaction) { + } /** * Called for each adjunct when the transaction completes, and is * removed from Drools memory. Any adjunct-specific cleanup can be * done at this point (e.g. freeing locks). */ - public default void cleanup(Transaction transaction) {} + public default void cleanup(Transaction transaction) { + } } /** diff --git a/controlloop/m2/base/src/test/java/org/onap/policy/m2/base/ActorOperationTest.java b/controlloop/m2/base/src/test/java/org/onap/policy/m2/base/ActorOperationTest.java index 4cbd05e03..ce5f2df1f 100644 --- a/controlloop/m2/base/src/test/java/org/onap/policy/m2/base/ActorOperationTest.java +++ b/controlloop/m2/base/src/test/java/org/onap/policy/m2/base/ActorOperationTest.java @@ -101,7 +101,7 @@ public class ActorOperationTest { } @Test - public void operationTest() throws ControlLoopException { + public void testOperation() throws ControlLoopException { Actor actor = new TestActor(); Operation operation = actor.createOperation(null, null, null, 0); assertNotNull(operation); diff --git a/controlloop/m2/base/src/test/java/org/onap/policy/m2/base/GuardAdjunctTest.java b/controlloop/m2/base/src/test/java/org/onap/policy/m2/base/GuardAdjunctTest.java index eacfc8f6f..78aab89d4 100644 --- a/controlloop/m2/base/src/test/java/org/onap/policy/m2/base/GuardAdjunctTest.java +++ b/controlloop/m2/base/src/test/java/org/onap/policy/m2/base/GuardAdjunctTest.java @@ -65,7 +65,7 @@ public class GuardAdjunctTest { } @Test - public void asyncQueryTest() { + public void testAsyncQuery() { Policy policy = new Policy(); policy.setActor("APPCLCM"); policy.setRecipe("test"); @@ -83,7 +83,7 @@ public class GuardAdjunctTest { } @Test - public void asyncCreateDbEntryTest() { + public void testAsyncCreateDbEntry() { ControlLoopOperation op = new ControlLoopOperation(); op.setStart(Instant.now().minusSeconds(1)); op.setEnd(Instant.now()); diff --git a/controlloop/m2/base/src/test/java/org/onap/policy/m2/base/TransactionTest.java b/controlloop/m2/base/src/test/java/org/onap/policy/m2/base/TransactionTest.java index 3c186ce6d..124509557 100644 --- a/controlloop/m2/base/src/test/java/org/onap/policy/m2/base/TransactionTest.java +++ b/controlloop/m2/base/src/test/java/org/onap/policy/m2/base/TransactionTest.java @@ -111,7 +111,7 @@ public class TransactionTest { } @Test - public void validControlLoopEventTest() { + public void testValidControlLoopEvent() { VirtualControlLoopEvent event = setControlLoopEvent(UUID.randomUUID(), "cltest", Instant.now(), ControlLoopTargetType.VM, "vserver.vserver-name"); Transaction transaction = new Transaction(null, "clvusptest", event.getRequestId(), createControlLoop()); @@ -119,7 +119,7 @@ public class TransactionTest { } @Test - public void noRequestIdControlLoopEventTest() { + public void testNoRequestIdControlLoopEvent() { VirtualControlLoopEvent event = setControlLoopEvent(null, "cltest", Instant.now(), ControlLoopTargetType.VM, "vserver.vserver-name"); Transaction transaction = new Transaction(null, "clvusptest", event.getRequestId(), createControlLoop()); @@ -128,7 +128,7 @@ public class TransactionTest { } @Test - public void noTargetTypeControlLoopEventTest() { + public void testNoTargetTypeControlLoopEvent() { VirtualControlLoopEvent event = setControlLoopEvent(UUID.randomUUID(), "cltest", Instant.now(), null, "vserver.vserver-name"); Transaction transaction = new Transaction(null, "clvusptest", event.getRequestId(), createControlLoop()); @@ -137,7 +137,7 @@ public class TransactionTest { } @Test - public void noTargetControlLoopEventTest() { + public void testNoTargetControlLoopEvent() { VirtualControlLoopEvent event = setControlLoopEvent(UUID.randomUUID(), "cltest", Instant.now(), ControlLoopTargetType.VM, null); Transaction transaction = new Transaction(null, "clvusptest", event.getRequestId(), createControlLoop()); @@ -152,14 +152,14 @@ public class TransactionTest { } @Test - public void getRequestIdTest() { + public void testGetRequestId() { UUID requestId = UUID.randomUUID(); Transaction transaction = new Transaction(null, "clvusptest", requestId, createControlLoop()); assertEquals(requestId, transaction.getRequestId()); } @Test - public void getWorkingMemoryTest() { + public void testGetWorkingMemory() { // Create mock working session StatefulKnowledgeSessionImpl mockWorkingMemory = mock(StatefulKnowledgeSessionImpl.class); Transaction transaction = new Transaction(mockWorkingMemory, "clvusptest", @@ -192,7 +192,7 @@ public class TransactionTest { } @Test - public void getOperationTimeoutTest() { + public void testGetOperationTimeout() { Transaction transaction = new Transaction(null, "clvusptest", UUID.randomUUID(), createControlLoop()); VirtualControlLoopEvent onset = setControlLoopEvent(UUID.randomUUID(), "cltest", null, ControlLoopTargetType.VM, "vserver.vserver-name"); @@ -201,7 +201,7 @@ public class TransactionTest { } @Test - public void getCurrentPolicy() { + public void testGetCurrentPolicy() { ControlLoopPolicy controlLoopPolicy = createControlLoop(); Transaction transaction = new Transaction(null, "clvusptest", UUID.randomUUID(), controlLoopPolicy); VirtualControlLoopEvent onset = setControlLoopEvent(UUID.randomUUID(), @@ -217,7 +217,7 @@ public class TransactionTest { } @Test - public void getNotificationTest() { + public void testGetNotification() { Transaction transaction = new Transaction(null, "clvusptest", UUID.randomUUID(), createControlLoop()); VirtualControlLoopEvent onset = setControlLoopEvent(UUID.randomUUID(), "cltest", null, ControlLoopTargetType.VM, "vserver.vserver-name"); diff --git a/controlloop/m2/base/src/test/java/org/onap/policy/m2/base/UtilTest.java b/controlloop/m2/base/src/test/java/org/onap/policy/m2/base/UtilTest.java index 53d97209b..d4518ca6f 100644 --- a/controlloop/m2/base/src/test/java/org/onap/policy/m2/base/UtilTest.java +++ b/controlloop/m2/base/src/test/java/org/onap/policy/m2/base/UtilTest.java @@ -22,7 +22,7 @@ package org.onap.policy.m2.base; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -54,7 +54,7 @@ public class UtilTest { } @Test - public void deliverTest() { + public void testDeliver() { Properties prop = new Properties(); prop.put("noop.sink.topics", "testTopic"); TopicEndpointManager.getManager().addTopicSinks(prop); diff --git a/controlloop/m2/guard/pom.xml b/controlloop/m2/guard/pom.xml index 501151a85..6362ad43b 100644 --- a/controlloop/m2/guard/pom.xml +++ b/controlloop/m2/guard/pom.xml @@ -40,7 +40,6 @@ org.mockito mockito-core - 2.13.0 test diff --git a/controlloop/m2/guard/src/test/java/org/onap/policy/guard/GuardContextTest.java b/controlloop/m2/guard/src/test/java/org/onap/policy/guard/GuardContextTest.java index 1a61d9019..777fc78f0 100644 --- a/controlloop/m2/guard/src/test/java/org/onap/policy/guard/GuardContextTest.java +++ b/controlloop/m2/guard/src/test/java/org/onap/policy/guard/GuardContextTest.java @@ -76,7 +76,7 @@ public class GuardContextTest { } @Test - public void guardDbResponseTest() throws InterruptedException { + public void testGuardDbResponse() throws InterruptedException { Properties props = new Properties(prop); props.setProperty("guard.disabled", "false"); props.setProperty("guard.javax.persistence.jdbc.user", "user"); @@ -99,7 +99,7 @@ public class GuardContextTest { } @Test - public void badValuesTest() throws InterruptedException { + public void testBadValues() throws InterruptedException { Properties props = new Properties(prop); props.setProperty("guard.disabled", "true"); props.setProperty("guard.pdp.rest.client.user", ""); @@ -120,7 +120,7 @@ public class GuardContextTest { } @Test - public void policyGuardResponseTest() { + public void testPolicyGuardResponse() { UUID requestId = UUID.randomUUID(); PolicyGuardResponse emptyResponse1 = new PolicyGuardResponse(null, null, null); diff --git a/controlloop/m2/lock/src/test/java/org/onap/policy/drools/m2/lock/LockAdjunctTest.java b/controlloop/m2/lock/src/test/java/org/onap/policy/drools/m2/lock/LockAdjunctTest.java index 4c5770fb2..65ad01a1d 100644 --- a/controlloop/m2/lock/src/test/java/org/onap/policy/drools/m2/lock/LockAdjunctTest.java +++ b/controlloop/m2/lock/src/test/java/org/onap/policy/drools/m2/lock/LockAdjunctTest.java @@ -71,7 +71,7 @@ public class LockAdjunctTest { } @Test - public void lockAdjunctTest() { + public void testLockAdjunct() { owner = new TestOwner(); lock = PolicyEngineConstants.getManager().createLock("key", "ownerKey", 60, owner, false); LockAdjunct lockA = new LockAdjunct(); diff --git a/controlloop/m2/test/src/test/java/org/onap/policy/m2/test/SimDmaap.java b/controlloop/m2/test/src/test/java/org/onap/policy/m2/test/SimDmaap.java index 3a80f9581..925e9451f 100644 --- a/controlloop/m2/test/src/test/java/org/onap/policy/m2/test/SimDmaap.java +++ b/controlloop/m2/test/src/test/java/org/onap/policy/m2/test/SimDmaap.java @@ -173,7 +173,7 @@ public class SimDmaap { * @return a JSON array, containing 0-limit messages */ String get(String group, long timeout, int limit) - throws InterruptedException { + throws InterruptedException { // look up the group -- create one if it doesn't exist Group groupObj = groupTable.get(group); if (groupObj == null) { @@ -257,7 +257,7 @@ public class SimDmaap { @PathParam("id") String id, @QueryParam("timeout") long timeout, @QueryParam("limit") int limit) - throws InterruptedException { + throws InterruptedException { logger.info("Receive: topic={}, group={}, id={}, timeout={}, limit={}", topic, group, id, timeout, limit); diff --git a/controlloop/m2/test/src/test/java/org/onap/policy/m2/test/Util.java b/controlloop/m2/test/src/test/java/org/onap/policy/m2/test/Util.java index 393a030f0..e2d258cb6 100644 --- a/controlloop/m2/test/src/test/java/org/onap/policy/m2/test/Util.java +++ b/controlloop/m2/test/src/test/java/org/onap/policy/m2/test/Util.java @@ -98,7 +98,7 @@ public class Util { * @return a String containing the contents of the file */ public static String fileToString(File file) - throws IOException, FileNotFoundException { + throws IOException, FileNotFoundException { try (FileInputStream fis = new FileInputStream(file)) { String string = inputStreamToString(fis); return string; @@ -113,7 +113,7 @@ public class Util { * @return a File, whose contents contain the string */ public static File stringToFile(String string, String suffix) - throws IOException { + throws IOException { File file = File.createTempFile("templates-util", suffix); file.deleteOnExit(); @@ -130,7 +130,7 @@ public class Util { * @return a File, whose contents contain the string */ public static File stringToFile(String string) - throws IOException { + throws IOException { return stringToFile(string, ""); } @@ -162,7 +162,7 @@ public class Util { * replaced */ public static String openAndReplace(String fileName, String... args) - throws IOException, FileNotFoundException { + throws IOException, FileNotFoundException { String text = fileToString(new File(fileName)); for (int i = 0 ; i < args.length ; i += 2) { text = text.replace(args[i], args[i + 1]); diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnBwControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnBwControlLoopTest.java index bf81c2d19..ab0070724 100644 --- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnBwControlLoopTest.java +++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnBwControlLoopTest.java @@ -1,7 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved. - * Modifications Copyright (C) 2019 AT&T Intellectual Property. + * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ public class CcvpnBwControlLoopTest extends ControlLoopBase implements TopicList } @Test - public void successTest() throws IOException { + public void testSuccess() throws IOException { /* * Allows the PolicyEngine to callback to this object to notify that there is an event ready @@ -91,7 +91,7 @@ public class CcvpnBwControlLoopTest extends ControlLoopBase implements TopicList } @Test - public void nullRequestTest() throws IOException { + public void testNullRequest() throws IOException { /* * Allows the PolicyEngine to callback to this object to notify that there is an event ready diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnControlLoopTest.java index 8fda5b4df..3599d47d0 100644 --- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnControlLoopTest.java +++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnControlLoopTest.java @@ -1,7 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2018 Huawei. All rights reserved. - * Modifications Copyright (C) 2019 AT&T Intellectual Property. + * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -58,7 +58,7 @@ public class CcvpnControlLoopTest extends ControlLoopBase implements TopicListen } @Test - public void successTest() throws IOException { + public void testSuccess() throws IOException { /* * Allows the PolicyEngine to callback to this object to notify that there is an event ready @@ -92,7 +92,7 @@ public class CcvpnControlLoopTest extends ControlLoopBase implements TopicListen } @Test - public void nullRequestTest() throws IOException { + public void testNullRequest() throws IOException { /* * Allows the PolicyEngine to callback to this object to notify that there is an event ready diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VcpeControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VcpeControlLoopTest.java index f41bd874b..e0cb0ef1f 100644 --- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VcpeControlLoopTest.java +++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VcpeControlLoopTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * demo * ================================================================================ - * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2020 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. @@ -29,7 +29,9 @@ import java.time.Instant; import java.util.HashMap; import java.util.UUID; import org.junit.BeforeClass; +import org.junit.FixMethodOrder; import org.junit.Test; +import org.junit.runners.MethodSorters; import org.onap.policy.appclcm.AppcLcmBody; import org.onap.policy.appclcm.AppcLcmDmaapWrapper; import org.onap.policy.appclcm.AppcLcmInput; @@ -44,6 +46,7 @@ import org.onap.policy.controlloop.VirtualControlLoopEvent; import org.onap.policy.controlloop.VirtualControlLoopNotification; import org.onap.policy.controlloop.policy.ControlLoopPolicy; +@FixMethodOrder(MethodSorters.NAME_ASCENDING) public class VcpeControlLoopTest extends ControlLoopBase implements TopicListener { /** @@ -60,7 +63,7 @@ public class VcpeControlLoopTest extends ControlLoopBase implements TopicListene } @Test - public void successTest() { + public void testASuccess() { /* * Allows the PolicyEngine to callback to this object to notify that there is an event ready @@ -99,7 +102,7 @@ public class VcpeControlLoopTest extends ControlLoopBase implements TopicListene } @Test - public void aaiGetFailTest() { + public void testBAaiGetFail() { /* * Allows the PolicyEngine to callback to this object to notify that there is an event ready diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VdnsControlLoopCqTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VdnsControlLoopCqTest.java index 0e05a0c6d..88c9e6ef7 100644 --- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VdnsControlLoopCqTest.java +++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VdnsControlLoopCqTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * demo * ================================================================================ - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2019-2020 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. @@ -57,7 +57,7 @@ public class VdnsControlLoopCqTest extends ControlLoopBase implements TopicListe } @Test - public void successTest() { + public void testSuccess() { /* * Allows the PolicyEngine to callback to this object to notify that there is an event ready @@ -96,7 +96,7 @@ public class VdnsControlLoopCqTest extends ControlLoopBase implements TopicListe } @Test - public void aaiGetFailTest() { + public void testAaiGetFail() { /* * Allows the PolicyEngine to callback to this object to notify that there is an event ready diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VdnsControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VdnsControlLoopTest.java index da237fa05..b7b034a9c 100644 --- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VdnsControlLoopTest.java +++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VdnsControlLoopTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * demo * ================================================================================ - * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2020 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. @@ -58,7 +58,7 @@ public class VdnsControlLoopTest extends ControlLoopBase implements TopicListene } @Test - public void successTest() { + public void testSuccessTest() { /* * Allows the PolicyEngine to callback to this object to notify that there is an event ready @@ -97,7 +97,7 @@ public class VdnsControlLoopTest extends ControlLoopBase implements TopicListene } @Test - public void namedQueryFailTest() { + public void testNamedQueryFail() { /* * Allows the PolicyEngine to callback to this object to notify that there is an event ready @@ -136,7 +136,7 @@ public class VdnsControlLoopTest extends ControlLoopBase implements TopicListene } @Test - public void aaiGetFailTest() { + public void testAaiGetFail() { /* * Allows the PolicyEngine to callback to this object to notify that there is an event ready diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfcControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfcControlLoopTest.java index 4f47bd0a9..4f472a07b 100644 --- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfcControlLoopTest.java +++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfcControlLoopTest.java @@ -3,7 +3,7 @@ * demo * ================================================================================ * Copyright (C) 2017-2018 Intel Corp. All rights reserved. - * Modifications Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2018-2020 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. @@ -61,7 +61,7 @@ public class VfcControlLoopTest extends ControlLoopBase implements TopicListener } @Test - public void successTest() throws IOException { + public void testSuccess() throws IOException { /* * Allows the PolicyEngine to callback to this object to notify that there is an event ready @@ -100,7 +100,7 @@ public class VfcControlLoopTest extends ControlLoopBase implements TopicListener } @Test - public void nullRequestTest() throws IOException { + public void testNullRequest() throws IOException { /* * Allows the PolicyEngine to callback to this object to notify that there is an event ready diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfwControlLoopCdsTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfwControlLoopCdsTest.java index a86f97d05..c480db71e 100644 --- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfwControlLoopCdsTest.java +++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfwControlLoopCdsTest.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019 Bell Canada. + * Modifications Copyright (C) 2020 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. @@ -145,7 +146,7 @@ public class VfwControlLoopCdsTest extends ControlLoopBase implements TopicListe } @Test - public void successTest() { + public void testSuccess() { /* * Allows the PolicyEngine to callback to this object to notify that there is an event ready diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfwControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfwControlLoopTest.java index cbdf09c8d..09c5927a8 100644 --- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfwControlLoopTest.java +++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VfwControlLoopTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * demo * ================================================================================ - * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2020 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. @@ -29,7 +29,9 @@ import java.time.Instant; import java.util.HashMap; import java.util.UUID; import org.junit.BeforeClass; +import org.junit.FixMethodOrder; import org.junit.Test; +import org.junit.runners.MethodSorters; import org.onap.policy.appc.Request; import org.onap.policy.appc.Response; import org.onap.policy.appc.ResponseCode; @@ -43,6 +45,7 @@ import org.onap.policy.controlloop.VirtualControlLoopEvent; import org.onap.policy.controlloop.VirtualControlLoopNotification; import org.onap.policy.controlloop.policy.ControlLoopPolicy; +@FixMethodOrder(MethodSorters.NAME_ASCENDING) public class VfwControlLoopTest extends ControlLoopBase implements TopicListener { /** @@ -60,7 +63,7 @@ public class VfwControlLoopTest extends ControlLoopBase implements TopicListener } @Test - public void successTest() { + public void testASuccess() { /* * Allows the PolicyEngine to callback to this object to notify that there is an event ready @@ -107,7 +110,7 @@ public class VfwControlLoopTest extends ControlLoopBase implements TopicListener } @Test - public void aaiFailTests() { + public void testBAaiFail() { /* * Allows the PolicyEngine to callback to this object to notify that there is an event ready diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VpciControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VpciControlLoopTest.java index d3aedd68f..e57af7760 100644 --- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VpciControlLoopTest.java +++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VpciControlLoopTest.java @@ -3,7 +3,7 @@ * demo * ================================================================================ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2018-2020 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. @@ -62,7 +62,7 @@ public class VpciControlLoopTest extends ControlLoopBase implements TopicListene } @Test - public void successTest() { + public void testSuccess() { /* * Allows the PolicyEngine to callback to this object to notify that there is an @@ -102,7 +102,7 @@ public class VpciControlLoopTest extends ControlLoopBase implements TopicListene } @Test - public void aaiGetFailTest() { + public void testAaiGetFail() { /* * Allows the PolicyEngine to callback to this object to notify that there is an diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VsonhControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VsonhControlLoopTest.java index 527fd298d..5aaab40bb 100644 --- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VsonhControlLoopTest.java +++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VsonhControlLoopTest.java @@ -3,7 +3,7 @@ * demo * ================================================================================ * Copyright (C) 2019 Wipro Limited Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2019-2020 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. @@ -62,7 +62,7 @@ public class VsonhControlLoopTest extends ControlLoopBase implements TopicListen } @Test - public void successTest() { + public void testSuccess() { /* * Allows the PolicyEngine to callback to this object to notify that there is an @@ -102,7 +102,7 @@ public class VsonhControlLoopTest extends ControlLoopBase implements TopicListen } @Test - public void aaiGetFailTest() { + public void testAaiGetFailTest() { /* * Allows the PolicyEngine to callback to this object to notify that there is an diff --git a/pom.xml b/pom.xml index b669efb32..0181dca2f 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ org.onap.policy.parent integration - 3.1.0 + 3.1.1-SNAPSHOT @@ -37,13 +37,6 @@ pom - - 1.8 - 1.8 - UTF-8 - 1.8 - 1.8 - https://nexus.onap.org /content/sites/site/${project.groupId}/${project.artifactId}/${project.version} @@ -59,8 +52,8 @@ reuseReports - 1.6.1 - 2.2.0 + 1.6.2-SNAPSHOT + 2.2.1-SNAPSHOT 1.6.0-SNAPSHOT @@ -104,8 +97,7 @@ maven-compiler-plugin ${project.encoding} - ${project.source.version} - ${project.target.version} + ${java.version} @@ -134,12 +126,13 @@ with minor changes --> onap-checkstyle/onap-java-style.xml - ${project.build.sourceDirectory} + ${project.build.sourceDirectory} true true true + /checkstyle-suppressions.xml true true warning -- cgit 1.2.3-korg