Code Review
/
nonrtric.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Support for transient policies not recreated at synchronization
[nonrtric.git]
/
policy-agent
/
src
/
test
/
java
/
org
/
oransc
/
policyagent
/
repository
/
LockTest.java
diff --git
a/policy-agent/src/test/java/org/oransc/policyagent/repository/LockTest.java
b/policy-agent/src/test/java/org/oransc/policyagent/repository/LockTest.java
index
6fd6c8b
..
5c1cc14
100644
(file)
--- a/
policy-agent/src/test/java/org/oransc/policyagent/repository/LockTest.java
+++ b/
policy-agent/src/test/java/org/oransc/policyagent/repository/LockTest.java
@@
-36,19
+36,21
@@
import reactor.test.StepVerifier;
@ExtendWith(MockitoExtension.class)
public class LockTest {
@ExtendWith(MockitoExtension.class)
public class LockTest {
+ @SuppressWarnings("squid:S2925") // "Thread.sleep" should not be used in tests.
private void sleep() {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
private void sleep() {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
+ // Do nothing.
}
}
private void asynchUnlock(Lock lock) {
}
}
private void asynchUnlock(Lock lock) {
- Thread t = new Thread(() -> {
+ Thread t
hread
= new Thread(() -> {
sleep();
lock.unlockBlocking();
});
sleep();
lock.unlockBlocking();
});
- t.start();
+ t
hread
.start();
}
@Test
}
@Test