This is an automated email from the ASF dual-hosted git repository.

joscorbe 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 6d8d3bb79a OAK-11737: Print paths ordered, to ensure tests are 
deterministic. (#2354)
6d8d3bb79a is described below

commit 6d8d3bb79a2f46ec66d9408265425e7feecf7f76
Author: José Andrés Cordero Benítez <josco...@users.noreply.github.com>
AuthorDate: Tue Jun 24 14:11:36 2025 +0200

    OAK-11737: Print paths ordered, to ensure tests are deterministic. (#2354)
---
 .../org/apache/jackrabbit/oak/run/RevisionsCommand.java    | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git 
a/oak-run/src/main/java/org/apache/jackrabbit/oak/run/RevisionsCommand.java 
b/oak-run/src/main/java/org/apache/jackrabbit/oak/run/RevisionsCommand.java
index c0210fedc1..1a165b4b49 100644
--- a/oak-run/src/main/java/org/apache/jackrabbit/oak/run/RevisionsCommand.java
+++ b/oak-run/src/main/java/org/apache/jackrabbit/oak/run/RevisionsCommand.java
@@ -17,11 +17,11 @@
 package org.apache.jackrabbit.oak.run;
 
 import java.io.IOException;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 import java.util.Locale;
 import java.util.Optional;
+import java.util.Set;
 import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutorService;
@@ -31,6 +31,7 @@ import java.util.concurrent.Semaphore;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.stream.Collectors;
 
 import ch.qos.logback.classic.Level;
 import ch.qos.logback.classic.LoggerContext;
@@ -81,7 +82,6 @@ import static 
org.apache.jackrabbit.oak.plugins.document.util.Utils.timestampToS
 import static org.apache.jackrabbit.oak.run.Utils.asCloseable;
 import static org.apache.jackrabbit.oak.run.Utils.createDocumentMKBuilder;
 import static org.apache.jackrabbit.oak.run.Utils.getMongoConnection;
-import static 
org.apache.jackrabbit.oak.spi.whiteboard.WhiteboardUtils.getService;
 
 /**
  * Gives information about current node revisions state.
@@ -424,8 +424,8 @@ public class RevisionsCommand implements Command {
         System.out.println("EmbeddedVerification is enabled : " + 
gc.isEmbeddedVerificationEnabled());
         System.out.println("ResetFullGC is enabled : " + 
options.isResetFullGC());
         System.out.println("Compaction is enabled : " + 
options.doCompaction());
-        System.out.println("IncludePaths are : " + gc.getFullGCIncludePaths());
-        System.out.println("ExcludePaths are : " + gc.getFullGCExcludePaths());
+        System.out.println("IncludePaths are : " + 
sortedSet(gc.getFullGCIncludePaths()));
+        System.out.println("ExcludePaths are : " + 
sortedSet(gc.getFullGCExcludePaths()));
         System.out.println("FullGcMode is : " + 
VersionGarbageCollector.getFullGcMode());
         System.out.println("FullGcDelayFactor is : " + 
gc.getFullGcDelayFactor());
         System.out.println("FullGcBatchSize is : " + gc.getFullGcBatchSize());
@@ -691,4 +691,10 @@ public class RevisionsCommand implements Command {
         // revisions command does not read blobs anyway.
         builder.setBlobStore(new MemoryBlobStore());
     }
+
+    private List<String> sortedSet(Set<String> set) {
+        return set.stream()
+                .sorted()
+                .collect(Collectors.toList());
+    }
 }

Reply via email to