Skip to content

Commit 1eed680

Browse files
fix test
1 parent 4f3723a commit 1eed680

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

shedlock-ydb/src/test/java/tech/ydb/lock/provider/YdbLockProviderTest.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ public void integrationTest() throws ExecutionException, InterruptedException, S
8787
Instant.now(), "semaphore", Duration.ofSeconds(100), Duration.ZERO));
8888

8989
optinal.ifPresent(simpleLock -> {
90-
if (locked.compareAndSet(false, true)) {
91-
logger.debug("Failed test! System has two leaders");
90+
if (!locked.compareAndSet(false, true)) {
91+
logger.error("Failed test! System has two leaders");
9292

9393
throw new RuntimeException();
9494
}
@@ -100,10 +100,9 @@ public void integrationTest() throws ExecutionException, InterruptedException, S
100100
}
101101

102102
atomicInt.addAndGet(50);
103+
locked.set(false);
103104
logger.info("Leader does UNLOCK!");
104-
105105
simpleLock.unlock();
106-
locked.set(false);
107106
});
108107

109108
try {

0 commit comments

Comments
 (0)