Code Review
/
nonrtric.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Bugfix, only one RIC was synched"
[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
825010a
..
ee7e04f
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,6
+36,7
@@
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);
private void sleep() {
try {
Thread.sleep(100);
@@
-71,10
+72,8
@@
public class LockTest {
Lock lock = new Lock();
Mono<Lock> seq = lock.lock(LockType.EXCLUSIVE) //
Lock lock = new Lock();
Mono<Lock> seq = lock.lock(LockType.EXCLUSIVE) //
- .doOnNext(l -> System.out.println("1 " + l)) //
.flatMap(l -> lock.lock(LockType.EXCLUSIVE)) //
.flatMap(l -> lock.lock(LockType.EXCLUSIVE)) //
- .flatMap(l -> lock.unlock()) //
- .doOnNext(l -> System.out.println("2 " + l)); //
+ .flatMap(l -> lock.unlock());
asynchUnlock(lock);
StepVerifier.create(seq) //
asynchUnlock(lock);
StepVerifier.create(seq) //