Adapt documentation to change in API
[nonrtric.git] / policy-agent / src / test / java / org / oransc / policyagent / repository / LockTest.java
index 825010a..ee7e04f 100644 (file)
@@ -36,6 +36,7 @@ import reactor.test.StepVerifier;
 @ExtendWith(MockitoExtension.class)
 public class LockTest {
 
+    @SuppressWarnings("squid:S2925") // "Thread.sleep" should not be used in tests.
     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) //
-            .doOnNext(l -> System.out.println("1 " + l)) //
             .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) //