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 ca...@apache.org on 2017/05/29 14:08:30 UTC

svn commit: r1796633 - /jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/directory/ActiveDeletedBlobCollectorTest.java

Author: catholicon
Date: Mon May 29 14:08:30 2017
New Revision: 1796633

URL: http://svn.apache.org/viewvc?rev=1796633&view=rev
Log:
OAK-2808: Active deletion of 'deleted' Lucene index files from DataStore without relying on full scale Blob GC

Posix perms don't work on windows. Ignoring inaccessibleWorkDirGivesNoop test for windows

Modified:
    jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/directory/ActiveDeletedBlobCollectorTest.java

Modified: jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/directory/ActiveDeletedBlobCollectorTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/directory/ActiveDeletedBlobCollectorTest.java?rev=1796633&r1=1796632&r2=1796633&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/directory/ActiveDeletedBlobCollectorTest.java (original)
+++ jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/directory/ActiveDeletedBlobCollectorTest.java Mon May 29 14:08:30 2017
@@ -16,6 +16,7 @@
  */
 package org.apache.jackrabbit.oak.plugins.index.lucene.directory;
 
+import com.google.common.base.StandardSystemProperty;
 import com.google.common.collect.Iterators;
 import com.google.common.collect.Lists;
 import org.apache.commons.io.FileUtils;
@@ -54,7 +55,7 @@ import static org.apache.jackrabbit.oak.
 import static org.hamcrest.Matchers.containsInAnyOrder;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeTrue;
 
 public class ActiveDeletedBlobCollectorTest {
     @Rule
@@ -231,6 +232,8 @@ public class ActiveDeletedBlobCollectorT
 
     @Test
     public void inaccessibleWorkDirGivesNoop() throws Exception {
+        assumeNotWindows();
+
         File rootDir = blobCollectionRoot.getRoot();
         File unwritableExistingRootFolder = new File(rootDir, "existingRoot");
         FileUtils.forceMkdir(unwritableExistingRootFolder);
@@ -260,6 +263,10 @@ public class ActiveDeletedBlobCollectorT
         assertThat(blobStore.deletedChunkIds, containsInAnyOrder(chunkIds.toArray()));
     }
 
+    private static void assumeNotWindows() {
+        assumeTrue(!StandardSystemProperty.OS_NAME.value().toLowerCase().contains("windows"));
+    }
+
     class ChunkDeletionTrackingBlobStore implements GarbageCollectableBlobStore {
         List<String> deletedChunkIds = Lists.newArrayList();