diff options
author | Hockla, Ali (ah999m) <ah999m@att.com> | 2020-01-15 15:04:09 -0600 |
---|---|---|
committer | Hockla, Ali (ah999m) <ah999m@att.com> | 2020-01-16 10:05:19 -0600 |
commit | 25d3e43f27fb4d055af69c6934f3531fef115a02 (patch) | |
tree | 297d30eca5c5fa2095c7786cd52aca43f6f77eef /controlloop/common | |
parent | 57fa6609eaac31098f468fde24a9300a38fca7ef (diff) |
policy/drools-apps jdk11 upgrades
Issue-ID: POLICY-1587
Change-Id: I02bef6c829f2f24954ae73fb0c540ab7198775ce
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
Diffstat (limited to 'controlloop/common')
13 files changed, 35 insertions, 46 deletions
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 --> <configLocation>onap-checkstyle/onap-java-style.xml</configLocation> <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory --> - <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory> + <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories> <includeResources>true</includeResources> <includeTestSourceDirectory>true</includeTestSourceDirectory> <includeTestResources>true</includeTestResources> 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 @@ <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>2.13.0</version> <scope>test</scope> </dependency> </dependencies> @@ -85,7 +84,7 @@ with minor changes --> <configLocation>onap-checkstyle/onap-java-style.xml</configLocation> <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory --> - <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory> + <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories> <includeResources>true</includeResources> <includeTestSourceDirectory>true</includeTestSourceDirectory> <includeTestResources>true</includeTestResources> 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 @@ </dependency> <dependency> <groupId>org.powermock</groupId> - <artifactId>powermock-api-mockito</artifactId> + <artifactId>powermock-api-mockito2</artifactId> <scope>test</scope> </dependency> <dependency> @@ -238,7 +238,7 @@ with minor changes --> <configLocation>onap-checkstyle/onap-java-style.xml</configLocation> <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory --> - <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory> + <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories> <includeResources>true</includeResources> <includeTestSourceDirectory>true</includeTestSourceDirectory> <includeTestResources>true</includeTestResources> 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. </description> - <properties> - <maven.compiler.source>1.8</maven.compiler.source> - <maven.compiler.target>1.8</maven.compiler.target> - </properties> - <build> <resources> <resource> @@ -294,7 +289,7 @@ </dependency> <dependency> <groupId>org.powermock</groupId> - <artifactId>powermock-api-mockito</artifactId> + <artifactId>powermock-api-mockito2</artifactId> <scope>test</scope> </dependency> <dependency> 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 </description> - <properties> - <maven.compiler.source>1.8</maven.compiler.source> - <maven.compiler.target>1.8</maven.compiler.target> - </properties> - <build> <plugins> <plugin> @@ -99,7 +94,7 @@ with minor changes --> <configLocation>onap-checkstyle/onap-java-style.xml</configLocation> <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory --> - <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory> + <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories> <includeResources>true</includeResources> <includeTestSourceDirectory>true</includeTestSourceDirectory> <includeTestResources>true</includeTestResources> 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 @@ <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>2.13.0</version> <scope>test</scope> </dependency> <dependency> @@ -156,7 +155,7 @@ with minor changes --> <configLocation>onap-checkstyle/onap-java-style.xml</configLocation> <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory --> - <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory> + <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories> <includeResources>true</includeResources> <includeTestSourceDirectory>true</includeTestSourceDirectory> <includeTestResources>true</includeTestResources> 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); |