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


##########
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:
   Since `null` is passed into the `MetricStatisticsProvider`, I think it would 
be nice to know why that is, instead of 
`ManagementFactory.getPlatformMBeanServer()`? 



-- 
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