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 77438fd12f OAK-12075 : replaced guava's
Uninterruptible.awaitUninterruptibly with oak-commons (#2704)
77438fd12f is described below
commit 77438fd12f7bb79c1678b2f9543d2f11ef9a2d5d
Author: Rishabh Kumar <[email protected]>
AuthorDate: Thu Jan 29 10:34:27 2026 +0530
OAK-12075 : replaced guava's Uninterruptible.awaitUninterruptibly with
oak-commons (#2704)
---
.../oak/plugins/metric/MetricStatisticsProviderTest.java | 4 ++--
.../apache/jackrabbit/oak/jcr/ConcurrentAddNodesClusterIT.java | 4 ++--
.../apache/jackrabbit/oak/segment/CompactionAndCleanupIT.java | 4 ++--
.../jackrabbit/oak/plugins/document/HierarchyConflictTest.java | 10 +++++-----
.../apache/jackrabbit/oak/plugins/document/RevisionTest.java | 5 ++---
5 files changed, 13 insertions(+), 14 deletions(-)
diff --git
a/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/metric/MetricStatisticsProviderTest.java
b/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/metric/MetricStatisticsProviderTest.java
index 91e3ab8f7a..f5e1cd064b 100644
---
a/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/metric/MetricStatisticsProviderTest.java
+++
b/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/metric/MetricStatisticsProviderTest.java
@@ -37,9 +37,9 @@ import javax.management.Query;
import javax.management.QueryExp;
import com.codahale.metrics.JmxReporter;
-import org.apache.jackrabbit.guava.common.util.concurrent.Uninterruptibles;
import org.apache.jackrabbit.api.stats.RepositoryStatistics.Type;
import org.apache.jackrabbit.oak.commons.collections.SetUtils;
+import
org.apache.jackrabbit.oak.commons.internal.concurrent.UninterruptibleUtils;
import org.apache.jackrabbit.oak.stats.CounterStats;
import org.apache.jackrabbit.oak.stats.GaugeStats;
import org.apache.jackrabbit.oak.stats.HistogramStats;
@@ -175,7 +175,7 @@ public class MetricStatisticsProviderTest {
threads.add(new Thread(new Runnable() {
@Override
public void run() {
- Uninterruptibles.awaitUninterruptibly(latch);
+ UninterruptibleUtils.awaitUninterruptibly(latch);
statsQueue.add(statsProvider.getMeter("foo",
StatsOptions.DEFAULT));
}
}));
diff --git
a/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentAddNodesClusterIT.java
b/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentAddNodesClusterIT.java
index 8dccac9851..159d05908d 100644
---
a/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentAddNodesClusterIT.java
+++
b/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentAddNodesClusterIT.java
@@ -37,7 +37,7 @@ import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.jcr.SimpleCredentials;
-import org.apache.jackrabbit.guava.common.util.concurrent.Uninterruptibles;
+import
org.apache.jackrabbit.oak.commons.internal.concurrent.UninterruptibleUtils;
import org.apache.jackrabbit.oak.plugins.document.DocumentMK;
import org.apache.jackrabbit.oak.plugins.document.util.MongoConnection;
import org.apache.jackrabbit.oak.plugins.index.IndexConstants;
@@ -152,7 +152,7 @@ public class ConcurrentAddNodesClusterIT {
@Override
public void run() {
try {
- Uninterruptibles.awaitUninterruptibly(latch);
+ UninterruptibleUtils.awaitUninterruptibly(latch);
session.refresh(false);
Node node =
session.getRootNode().addNode(name+count++, "oak:Unstructured");
for (int j = 0; j < NODE_COUNT && !stop.get() ;
j++) {
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 4b56807173..9e1ecd4ae6 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.awaitUninterruptibly;
import static
org.apache.jackrabbit.guava.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
import static java.lang.Integer.getInteger;
import static java.lang.String.valueOf;
@@ -66,6 +65,7 @@ import org.apache.jackrabbit.oak.api.CommitFailedException;
import org.apache.jackrabbit.oak.api.PropertyState;
import org.apache.jackrabbit.oak.api.Type;
import org.apache.jackrabbit.oak.commons.concurrent.ExecutorCloser;
+import
org.apache.jackrabbit.oak.commons.internal.concurrent.UninterruptibleUtils;
import org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore;
import org.apache.jackrabbit.oak.plugins.blob.datastore.OakFileDataStore;
import org.apache.jackrabbit.oak.plugins.memory.StringPropertyState;
@@ -723,7 +723,7 @@ public class CompactionAndCleanupIT {
@Override
public String getValue() {
readyToCompact.countDown();
- awaitUninterruptibly(compactionCompleted);
+
UninterruptibleUtils.awaitUninterruptibly(compactionCompleted);
return super.getValue();
}
});
diff --git
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/HierarchyConflictTest.java
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/HierarchyConflictTest.java
index 7d38259c24..2f0dce4aff 100644
---
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/HierarchyConflictTest.java
+++
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/HierarchyConflictTest.java
@@ -21,6 +21,7 @@ import java.util.List;
import java.util.concurrent.CountDownLatch;
import org.apache.jackrabbit.oak.api.CommitFailedException;
+import
org.apache.jackrabbit.oak.commons.internal.concurrent.UninterruptibleUtils;
import org.apache.jackrabbit.oak.plugins.commit.AnnotatingConflictHandler;
import org.apache.jackrabbit.oak.plugins.commit.ConflictHook;
import org.apache.jackrabbit.oak.plugins.commit.ConflictValidatorProvider;
@@ -38,7 +39,6 @@ import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import static
org.apache.jackrabbit.guava.common.util.concurrent.Uninterruptibles.awaitUninterruptibly;
import static
org.apache.jackrabbit.guava.common.util.concurrent.Uninterruptibles.joinUninterruptibly;
import static org.apache.jackrabbit.oak.api.CommitFailedException.OAK;
import static org.junit.Assert.fail;
@@ -89,7 +89,7 @@ public class HierarchyConflictTest {
public void edit(NodeBuilder builder) {
builder.getChildNode("foo").getChildNode("bar").remove();
nodeRemoved.countDown();
- awaitUninterruptibly(nodeAdded);
+
UninterruptibleUtils.awaitUninterruptibly(nodeAdded);
}
});
} catch (CommitFailedException e) {
@@ -100,7 +100,7 @@ public class HierarchyConflictTest {
t.start();
// wait for r2 to enter merge phase
- awaitUninterruptibly(nodeRemoved);
+ UninterruptibleUtils.awaitUninterruptibly(nodeRemoved);
try {
// must fail because /foo/bar was removed
merge(store, r1, new EditorCallback() {
@@ -147,7 +147,7 @@ public class HierarchyConflictTest {
public void edit(NodeBuilder builder) {
builder.getChildNode("foo").getChildNode("bar").child("qux");
nodeAdded.countDown();
- awaitUninterruptibly(nodeRemoved);
+
UninterruptibleUtils.awaitUninterruptibly(nodeRemoved);
}
});
} catch (CommitFailedException e) {
@@ -158,7 +158,7 @@ public class HierarchyConflictTest {
t.start();
// wait for r1 to enter merge phase
- awaitUninterruptibly(nodeAdded);
+ UninterruptibleUtils.awaitUninterruptibly(nodeAdded);
try {
// must fail because /foo/bar/qux was added
merge(store, r2, new EditorCallback() {
diff --git
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/RevisionTest.java
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/RevisionTest.java
index a99482c08d..7a74ee009f 100644
---
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/RevisionTest.java
+++
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/RevisionTest.java
@@ -36,8 +36,7 @@ import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-import org.apache.jackrabbit.guava.common.util.concurrent.Uninterruptibles;
-
+import
org.apache.jackrabbit.oak.commons.internal.concurrent.UninterruptibleUtils;
import org.junit.Test;
/**
@@ -213,7 +212,7 @@ public class RevisionTest {
workers.add(new Thread(new Runnable() {
@Override
public void run() {
- Uninterruptibles.awaitUninterruptibly(startLatch);
+ UninterruptibleUtils.awaitUninterruptibly(startLatch);
for (int j = 0; j < noOfLoops && !stop.get(); j++) {
revisionQueue.add(Revision.newRevision(1));
}