You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by da...@apache.org on 2026/02/24 17:43:48 UTC
(jackrabbit-oak) branch trunk updated: OAK-12077 : fixed flacky test by increasing sleep time and adding small margin in verification (#2763)
This is an automated email from the ASF dual-hosted git repository.
daim pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
The following commit(s) were added to refs/heads/trunk by this push:
new 0124baef6d OAK-12077 : fixed flacky test by increasing sleep time and adding small margin in verification (#2763)
0124baef6d is described below
commit 0124baef6dc7500f1e6657152d90655e941ee85f
Author: Rishabh Kumar <ri...@gmail.com>
AuthorDate: Tue Feb 24 23:13:42 2026 +0530
OAK-12077 : fixed flacky test by increasing sleep time and adding small margin in verification (#2763)
---
.../oak/commons/internal/concurrent/UninterruptibleUtilsTest.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/internal/concurrent/UninterruptibleUtilsTest.java b/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/internal/concurrent/UninterruptibleUtilsTest.java
index 788fe2c3fa..aa7c6fa67c 100644
--- a/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/internal/concurrent/UninterruptibleUtilsTest.java
+++ b/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/internal/concurrent/UninterruptibleUtilsTest.java
@@ -193,7 +193,7 @@ public class UninterruptibleUtilsTest {
public void testJoinShouldWaitUntilThreadFinishes() {
final Thread worker = new Thread(() -> {
try {
- Thread.sleep(20L);
+ Thread.sleep(100L); // Increased sleep to reduce flakiness
} catch (InterruptedException ignored) {
}
});
@@ -204,7 +204,8 @@ public class UninterruptibleUtilsTest {
UninterruptibleUtils.joinUninterruptibly(worker);
long elapsedMillis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - start);
- Assert.assertTrue("Join should respect timeout", elapsedMillis >= 20L );
+ // Allow a small margin for scheduling jitter
+ Assert.assertTrue("Join should respect timeout (elapsedMillis=" + elapsedMillis + ")", elapsedMillis >= 90L);
}
@Test