nfsantos commented on code in PR #1182:
URL: https://github.com/apache/jackrabbit-oak/pull/1182#discussion_r1394411438


##########
oak-run-commons/src/test/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/pipelined/PipelinedMergeSortTaskTest.java:
##########
@@ -89,27 +94,41 @@ private PipelinedMergeSortTask.Result runTest(Compression 
algorithm, Path... fil
         Path sortRoot = sortFolder.getRoot().toPath();
         // +1 for the Sentinel.
         ArrayBlockingQueue<Path> sortedFilesQueue = new 
ArrayBlockingQueue<>(files.length + 1);
-        PipelinedMergeSortTask mergeSortTask = new 
PipelinedMergeSortTask(sortRoot, pathComparator, algorithm, sortedFilesQueue);
-        // Enqueue all the files that are to be merged
-        for (Path file : files) {
-            // The intermediate files are deleted after being merged, so we 
should copy them to the temporary sort root folder
-            Path workDirCopy = Files.copy(file, 
sortRoot.resolve(file.getFileName()));
-            sortedFilesQueue.put(workDirCopy);
+        ScheduledExecutorService executor = 
Executors.newSingleThreadScheduledExecutor();
+        try (MetricStatisticsProvider metricStatisticsProvider = new 
MetricStatisticsProvider(null, executor)) {

Review Comment:
   If we pass null to the constructor, the `MetricStatisticsProvider` will use 
the `ManagementFactory.getPlatformMBeanServer()`. I think the problem here is 
lack of documentation on the construtor of `MetricStatisticsProvider`. I don't 
think this PR should correct the missing documentation. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to