Pass operating system information to the Compact tool backend
package org.apache.jackrabbit.oak.segment.upgrade;
+import static com.google.common.base.StandardSystemProperty.OS_NAME;
import static com.google.common.collect.Iterables.transform;
import static java.lang.String.format;
import static java.util.concurrent.TimeUnit.MINUTES;
@@ -42,7 +43,6 @@ import org.apache.jackrabbit.oak.segment.file.InvalidFileStoreVersionException;
import org.apache.jackrabbit.oak.segment.file.tar.IOMonitorAdapter;
import org.apache.jackrabbit.oak.segment.file.tar.TarFiles;
import org.apache.jackrabbit.oak.segment.tool.Compact;
-import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -96,9 +96,11 @@ public class UpgradeIT {
public void offRCUpgradesSegments() throws IOException, InvalidFileStoreVersionException {
checkSegmentVersion(V_12);
checkStoreVersion(1);
+
Compact.builder()
.withPath(fileStoreHome.getRoot())
.withMmap(true)
+ .withOs(OS_NAME.value())
.withForce(true)
.build()
.run();
@@ -116,6 +118,7 @@ public class UpgradeIT {
Compact.builder()
.withPath(fileStoreHome.getRoot())
.withMmap(true)
+ .withOs(OS_NAME.value())
.withForce(false)
.build()
.run();
