jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1584381 - /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStoreTest.java
Date Thu, 03 Apr 2014 20:27:35 GMT
Author: jukka
Date: Thu Apr  3 20:27:34 2014
New Revision: 1584381

URL: http://svn.apache.org/r1584381
Log:
OAK-631: SegmentMK: Implement garbage collection

The return value of collectFiles is no longer a SortedMap,
use TreeSet to explicitly order the returned list of index numbers

Modified:
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStoreTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStoreTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStoreTest.java?rev=1584381&r1=1584380&r2=1584381&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStoreTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStoreTest.java
Thu Apr  3 20:27:34 2014
@@ -17,6 +17,7 @@
 package org.apache.jackrabbit.oak.plugins.segment.file;
 
 import static com.google.common.collect.Lists.newArrayList;
+import static com.google.common.collect.Sets.newTreeSet;
 import static junit.framework.Assert.assertEquals;
 import static junit.framework.Assert.assertFalse;
 import static junit.framework.Assert.assertTrue;
@@ -93,7 +94,9 @@ public class FileStoreTest {
         new FileOutputStream(new File(directory, "bulk00005a.tar")).close();
 
         Map<Integer, ?> files = FileStore.collectFiles(directory);
-        assertEquals(newArrayList(0, 1, 31, 32, 33), newArrayList(files.keySet()));
+        assertEquals(
+                newArrayList(0, 1, 31, 32, 33),
+                newArrayList(newTreeSet(files.keySet())));
 
         assertTrue(new File(directory, "data00000a.tar").isFile());
         assertTrue(new File(directory, "data00001a.tar").isFile());
@@ -102,7 +105,9 @@ public class FileStoreTest {
         assertTrue(new File(directory, "data00033a.tar").isFile());
 
         files = FileStore.collectFiles(directory);
-        assertEquals(newArrayList(0, 1, 31, 32, 33), newArrayList(files.keySet()));
+        assertEquals(
+                newArrayList(0, 1, 31, 32, 33),
+                newArrayList(newTreeSet(files.keySet())));
     }
 
 }



Mime
View raw message