Author: thomasm
Date: Wed Nov 9 16:13:03 2016
New Revision: 1768995
URL: http://svn.apache.org/viewvc?rev=1768995&view=rev
Log:
OAK-5009 ExternalToExternalMigrationTest failures on Windows
Modified:
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/blob/migration/AbstractMigratorTest.java
Modified:
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/blob/migration/AbstractMigratorTest.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/blob/migration/AbstractMigratorTest.java?rev=1768995&r1=1768994&r2=1768995&view=diff
==============================================================================
---
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/blob/migration/AbstractMigratorTest.java
(original)
+++
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/blob/migration/AbstractMigratorTest.java
Wed Nov 9 16:13:03 2016
@@ -19,11 +19,13 @@
package org.apache.jackrabbit.oak.plugins.blob.migration;
-import static junit.framework.Assert.assertEquals;
+import static org.junit.Assert.assertEquals;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
+import java.nio.file.FileSystems;
+import java.nio.file.Path;
import java.util.Random;
import org.apache.commons.io.FileUtils;
@@ -45,8 +47,6 @@ import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
-import com.google.common.io.Files;
-
public abstract class AbstractMigratorTest {
private static final int LENGTH = 1024 * 16;
@@ -63,7 +63,8 @@ public abstract class AbstractMigratorTe
@Before
public void setup() throws CommitFailedException,
IllegalArgumentException, IOException {
- repository = Files.createTempDir();
+ Path target = FileSystems.getDefault().getPath("target");
+ repository = java.nio.file.Files.createTempDirectory(target,
"migrate-").toFile();
BlobStore oldBlobStore = createOldBlobStore(repository);
NodeStore originalNodeStore = createNodeStore(oldBlobStore,
repository);
createContent(originalNodeStore);
@@ -86,11 +87,10 @@ public abstract class AbstractMigratorTe
@After
public void teardown() throws IOException {
closeNodeStore();
- FileUtils.deleteDirectory(repository);
+ FileUtils.deleteQuietly(repository);
}
@Test
- @Ignore("OAK-5009")
public void blobsExistsOnTheNewBlobStore() throws IOException,
CommitFailedException {
migrator.migrate();
NodeState root = nodeStore.getRoot();
@@ -100,7 +100,6 @@ public abstract class AbstractMigratorTe
}
@Test
- @Ignore("OAK-5009")
public void blobsCanBeReadAfterSwitchingBlobStore() throws IOException,
CommitFailedException {
migrator.migrate();
closeNodeStore();