commit | 22fda392c020fb6381afcc645554fd01636661ed | [log] [tgz] |
---|---|---|
author | Jim Hahn <jrh3@att.com> | Fri Aug 28 17:01:46 2020 -0400 |
committer | Jim Hahn <jrh3@att.com> | Fri Aug 28 17:04:29 2020 -0400 |
tree | 851d7989a6420a231f021c4eb7c9a28600c9a862 | |
parent | 3fb61743113683b2be271429263a96fb0a7dd90a [diff] |
Fix sonar issue in distributed locking Fixed sonar issue: - Refactor the code of the lambda to have only one invocation throwing an exception Issue-ID: POLICY-2616 Change-Id: I8d96b95d0da9a780daacec7a4de17167642b03c1 Signed-off-by: Jim Hahn <jrh3@att.com>
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 4815271..0c0dbf1 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
@@ -258,7 +258,8 @@ } }; - assertThatThrownBy(() -> feature.beforeCreateLockManager(engine, new Properties())) + Properties props = new Properties(); + assertThatThrownBy(() -> feature.beforeCreateLockManager(engine, props)) .isInstanceOf(DistributedLockManagerException.class); }