aboutsummaryrefslogtreecommitdiffstats
path: root/feature-distributed-locking
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2021-02-12 15:18:12 +0000
committerGerrit Code Review <gerrit@onap.org>2021-02-12 15:18:12 +0000
commit65c7d3a4dcd2841c5fafab6e7b8d310e5ec1cb6c (patch)
tree62d22bd4ee6ff1f3f05407efb3905f700494ccba /feature-distributed-locking
parent28ba5ad9ef57524a81a997f7200e7126a4462859 (diff)
parent757a65fe95f5f203545085ea63f659a817dad260 (diff)
Merge "Fix sonars from dependency upgrade"
Diffstat (limited to 'feature-distributed-locking')
-rw-r--r--feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java b/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java
index 0c0dbf11..d36fbe1f 100644
--- a/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java
+++ b/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2021 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.
@@ -70,10 +70,11 @@ import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.kie.api.runtime.KieSession;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.common.utils.services.OrderedServiceImpl;
import org.onap.policy.distributed.locking.DistributedLockManager.DistributedLock;
import org.onap.policy.drools.core.PolicySession;
@@ -86,6 +87,7 @@ import org.onap.policy.drools.system.PolicyEngine;
import org.onap.policy.drools.system.PolicyEngineConstants;
import org.powermock.reflect.Whitebox;
+@RunWith(MockitoJUnitRunner.class)
public class DistributedLockManagerTest {
private static final long EXPIRE_SEC = 900L;
private static final long RETRY_SEC = 60L;
@@ -186,8 +188,6 @@ public class DistributedLockManagerTest {
*/
@Before
public void setUp() throws SQLException {
- MockitoAnnotations.initMocks(this);
-
// grant() and deny() calls will come through here and be immediately executed
session = new PolicySession(null, null, kieSess) {
@Override