summaryrefslogtreecommitdiffstats
path: root/controlloop/m2/base/src
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/m2/base/src')
-rw-r--r--controlloop/m2/base/src/main/java/org/onap/policy/m2/base/Operation.java3
-rw-r--r--controlloop/m2/base/src/main/java/org/onap/policy/m2/base/Transaction.java6
-rw-r--r--controlloop/m2/base/src/test/java/org/onap/policy/m2/base/ActorOperationTest.java2
-rw-r--r--controlloop/m2/base/src/test/java/org/onap/policy/m2/base/GuardAdjunctTest.java4
-rw-r--r--controlloop/m2/base/src/test/java/org/onap/policy/m2/base/TransactionTest.java18
-rw-r--r--controlloop/m2/base/src/test/java/org/onap/policy/m2/base/UtilTest.java4
6 files changed, 20 insertions, 17 deletions
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);