You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by am...@apache.org on 2022/12/13 04:36:12 UTC
[jackrabbit-oak] branch trunk updated: OAK-10013: oak-run-commons: tests fail on Windows Subsystem for Linux (#787)
This is an automated email from the ASF dual-hosted git repository.
amitj 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 e40b0f57c0 OAK-10013: oak-run-commons: tests fail on Windows Subsystem for Linux (#787)
e40b0f57c0 is described below
commit e40b0f57c0160d70af60849fb676d0943193df15
Author: Amit Jain <am...@apache.org>
AuthorDate: Tue Dec 13 10:06:08 2022 +0530
OAK-10013: oak-run-commons: tests fail on Windows Subsystem for Linux (#787)
-Convert TemporaryFileFolder & adding custom tmpDir from @Before to @BeforeClass
---
.../indexer/document/flatfile/FlatFileSplitterTest.java | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/oak-run-commons/src/test/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/FlatFileSplitterTest.java b/oak-run-commons/src/test/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/FlatFileSplitterTest.java
index 0824e92bd6..0efc2dd025 100644
--- a/oak-run-commons/src/test/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/FlatFileSplitterTest.java
+++ b/oak-run-commons/src/test/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/FlatFileSplitterTest.java
@@ -39,7 +39,8 @@ import org.apache.jackrabbit.oak.spi.blob.MemoryBlobStore;
import org.apache.jackrabbit.oak.spi.commit.CompositeEditorProvider;
import org.apache.jackrabbit.oak.spi.commit.EditorHook;
import org.apache.jackrabbit.oak.spi.state.NodeStore;
-import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.junit.contrib.java.lang.system.RestoreSystemProperties;
@@ -79,20 +80,22 @@ public class FlatFileSplitterTest {
private ClassLoader classLoader = getClass().getClassLoader();
private MemoryBlobStore store = new MemoryBlobStore();
private NodeStateEntryReader entryReader = new NodeStateEntryReader(store);
- @Rule
- public TemporaryFolder temporaryFolder = new TemporaryFolder(new File("target"));
+ @ClassRule
+ public static TemporaryFolder temporaryFolder = new TemporaryFolder(new File("target"));
+ @ClassRule
+ public static final TestRule restoreClassSystemProperties = new RestoreSystemProperties();
@Rule
public final TestRule restoreSystemProperties = new RestoreSystemProperties();
- @Before
- public void setup() throws IOException {
+ @BeforeClass
+ public static void setup() throws IOException {
try {
System.setProperty("java.io.tmpdir", temporaryFolder.newFolder("systemp").getAbsolutePath());
} catch (IOException e) {
throw e;
}
}
-
+
@Test
public void ntBaseSkipSplit() throws IOException, IllegalAccessException {
Set<String> splitNodeTypeNames = new HashSet<>();