aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/feature-controlloop-trans
diff options
context:
space:
mode:
authorHockla, Ali (ah999m) <ah999m@att.com>2020-01-15 15:04:09 -0600
committerHockla, Ali (ah999m) <ah999m@att.com>2020-01-16 10:05:19 -0600
commit25d3e43f27fb4d055af69c6934f3531fef115a02 (patch)
tree297d30eca5c5fa2095c7786cd52aca43f6f77eef /controlloop/common/feature-controlloop-trans
parent57fa6609eaac31098f468fde24a9300a38fca7ef (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/feature-controlloop-trans')
-rw-r--r--controlloop/common/feature-controlloop-trans/pom.xml9
-rw-r--r--controlloop/common/feature-controlloop-trans/src/test/java/org/onap/policy/drools/apps/controlloop/feature/trans/ControlLoopMetricsFeatureTest.java24
2 files changed, 14 insertions, 19 deletions
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() {