Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/ConcurrentRepackTest.java')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/ConcurrentRepackTest.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/ConcurrentRepackTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/ConcurrentRepackTest.java
index 66b02cb46a..ba9aa24991 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/ConcurrentRepackTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/ConcurrentRepackTest.java
@@ -44,6 +44,13 @@
package org.eclipse.jgit.storage.file;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
@@ -65,8 +72,12 @@ import org.eclipse.jgit.revwalk.RevObject;
import org.eclipse.jgit.revwalk.RevWalk;
import org.eclipse.jgit.storage.pack.PackWriter;
import org.eclipse.jgit.util.FileUtils;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
public class ConcurrentRepackTest extends RepositoryTestCase {
+ @Before
public void setUp() throws Exception {
WindowCacheConfig windowCacheConfig = new WindowCacheConfig();
windowCacheConfig.setPackedGitOpenFiles(1);
@@ -74,12 +85,14 @@ public class ConcurrentRepackTest extends RepositoryTestCase {
super.setUp();
}
- protected void tearDown() throws Exception {
+ @After
+ public void tearDown() throws Exception {
super.tearDown();
WindowCacheConfig windowCacheConfig = new WindowCacheConfig();
WindowCache.reconfigure(windowCacheConfig);
}
+ @Test
public void testObjectInNewPack() throws IncorrectObjectTypeException,
IOException {
// Create a new object in a new pack, and test that it is present.
@@ -90,6 +103,7 @@ public class ConcurrentRepackTest extends RepositoryTestCase {
assertEquals(o1.name(), parse(o1).name());
}
+ @Test
public void testObjectMovedToNewPack1()
throws IncorrectObjectTypeException, IOException {
// Create an object and pack it. Then remove that pack and put the
@@ -116,6 +130,7 @@ public class ConcurrentRepackTest extends RepositoryTestCase {
assertEquals(o1.name(), parse(o1).name());
}
+ @Test
public void testObjectMovedWithinPack()
throws IncorrectObjectTypeException, IOException {
// Create an object and pack it.
@@ -148,6 +163,7 @@ public class ConcurrentRepackTest extends RepositoryTestCase {
assertEquals(o2.name(), parse(o2).name());
}
+ @Test
public void testObjectMovedToNewPack2()
throws IncorrectObjectTypeException, IOException {
// Create an object and pack it. Then remove that pack and put the

Back to the top