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 3cae87f0f4 OAK-12078 : replaced guava's
Uninterruptible.sleepUninterruptibly with oak-commons (#2710)
3cae87f0f4 is described below
commit 3cae87f0f45395d368f8586ebf836bfb1b81332d
Author: Rishabh Kumar <[email protected]>
AuthorDate: Thu Jan 29 15:46:17 2026 +0530
OAK-12078 : replaced guava's Uninterruptible.sleepUninterruptibly with
oak-commons (#2710)
---
.../jackrabbit/oak/segment/CompactionAndCleanupIT.java | 5 ++---
.../oak/segment/SegmentBufferWriterPoolTest.java | 16 ++++++++--------
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git
a/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/CompactionAndCleanupIT.java
b/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/CompactionAndCleanupIT.java
index 9e1ecd4ae6..d578fc37a1 100644
---
a/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/CompactionAndCleanupIT.java
+++
b/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/CompactionAndCleanupIT.java
@@ -18,7 +18,6 @@
*/
package org.apache.jackrabbit.oak.segment;
-import static
org.apache.jackrabbit.guava.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
import static java.lang.Integer.getInteger;
import static java.lang.String.valueOf;
import static java.util.concurrent.Executors.newFixedThreadPool;
@@ -566,7 +565,7 @@ public class CompactionAndCleanupIT {
});
// Give the compaction thread a head start
- sleepUninterruptibly(1, SECONDS);
+ UninterruptibleUtils.sleepUninterruptibly(1, SECONDS);
fileStore.close();
try {
@@ -599,7 +598,7 @@ public class CompactionAndCleanupIT {
@Override
public Void call() throws Exception {
// Give the compaction thread a head start
- sleepUninterruptibly(1000, MILLISECONDS);
+ UninterruptibleUtils.sleepUninterruptibly(1000,
MILLISECONDS);
fileStore.cancelGC();
return null;
}
diff --git
a/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentBufferWriterPoolTest.java
b/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentBufferWriterPoolTest.java
index 3816dee530..bb1f311ebe 100644
---
a/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentBufferWriterPoolTest.java
+++
b/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentBufferWriterPoolTest.java
@@ -19,7 +19,6 @@
package org.apache.jackrabbit.oak.segment;
-import static
org.apache.jackrabbit.guava.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
import static java.util.concurrent.Executors.newSingleThreadExecutor;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static org.junit.Assert.assertEquals;
@@ -38,6 +37,7 @@ import java.util.concurrent.Future;
import java.util.concurrent.TimeoutException;
import org.apache.jackrabbit.oak.commons.collections.SetUtils;
+import
org.apache.jackrabbit.oak.commons.internal.concurrent.UninterruptibleUtils;
import org.apache.jackrabbit.oak.segment.WriteOperationHandler.WriteOperation;
import org.apache.jackrabbit.oak.segment.file.tar.GCGeneration;
import org.apache.jackrabbit.oak.segment.memory.MemoryStore;
@@ -107,7 +107,7 @@ public class SegmentBufferWriterPoolTest {
Future<RecordId> res3 = execute(gen, createOp("c", map1), 2);
// Give the tasks some time to complete
- sleepUninterruptibly(10, MILLISECONDS);
+ UninterruptibleUtils.sleepUninterruptibly(10, MILLISECONDS);
assertEquals(rootId, res1.get());
assertEquals(rootId, res2.get());
@@ -120,7 +120,7 @@ public class SegmentBufferWriterPoolTest {
Future<RecordId> res6 = execute(gen, createOp("c", map2), 2);
// Give the tasks some time to complete
- sleepUninterruptibly(10, MILLISECONDS);
+ UninterruptibleUtils.sleepUninterruptibly(10, MILLISECONDS);
assertEquals(rootId, res4.get());
assertEquals(rootId, res5.get());
@@ -138,7 +138,7 @@ public class SegmentBufferWriterPoolTest {
Future<RecordId> res3 = execute(gen, createOp("c", map1), 2);
// Give the tasks some time to complete
- sleepUninterruptibly(10, MILLISECONDS);
+ UninterruptibleUtils.sleepUninterruptibly(10, MILLISECONDS);
assertEquals(rootId, res1.get());
assertEquals(rootId, res2.get());
@@ -153,7 +153,7 @@ public class SegmentBufferWriterPoolTest {
Future<RecordId> res6 = execute(gen, createOp("c", map2), 2);
// Give the tasks some time to complete
- sleepUninterruptibly(10, MILLISECONDS);
+ UninterruptibleUtils.sleepUninterruptibly(10, MILLISECONDS);
assertEquals(rootId, res4.get());
assertEquals(rootId, res5.get());
@@ -171,7 +171,7 @@ public class SegmentBufferWriterPoolTest {
Future<RecordId> res3 = execute(gen, createOp("c", map1), 2);
// Give the tasks some time to complete
- sleepUninterruptibly(10, MILLISECONDS);
+ UninterruptibleUtils.sleepUninterruptibly(10, MILLISECONDS);
assertEquals(rootId, res1.get());
assertEquals(rootId, res2.get());
@@ -188,7 +188,7 @@ public class SegmentBufferWriterPoolTest {
Future<RecordId> res6 = execute(gen, createOp("c", map2), 2);
// Give the tasks some time to complete
- sleepUninterruptibly(10, MILLISECONDS);
+ UninterruptibleUtils.sleepUninterruptibly(10, MILLISECONDS);
assertEquals(rootId, res4.get());
assertEquals(rootId, res5.get());
@@ -203,7 +203,7 @@ public class SegmentBufferWriterPoolTest {
Future<RecordId> res9 = execute(gen.nextFull(), createOp("c", map3),
2);
// Give the tasks some time to complete
- sleepUninterruptibly(10, MILLISECONDS);
+ UninterruptibleUtils.sleepUninterruptibly(10, MILLISECONDS);
assertEquals(rootId, res7.get());
assertEquals(rootId, res8.get());