public abstract class GcTestCase extends LocalDiskRepositoryTestCase
Modifier and Type | Field and Description |
---|---|
protected GC |
gc |
protected FileRepository |
repo |
protected GC.RepoStatistics |
stats |
protected TestRepository<FileRepository> |
tr |
ASSUME_UNCHANGED, author, committer, CONTENT, CONTENT_ID, LENGTH, mockSystemReader, MOD_TIME, SMUDGE
Constructor and Description |
---|
GcTestCase() |
Modifier and Type | Method and Description |
---|---|
protected RevCommit |
commitChain(int depth)
Create a chain of commits of given depth.
|
protected static void |
fsTick() |
protected long |
lastModified(AnyObjectId objectId) |
void |
setUp() |
void |
tearDown() |
addRepoToClose, createBareRepository, createTempDirectory, createTempFile, createUniqueTestGitDir, createWorkRepository, getCeilings, getTemporaryDirectory, indexState, read, recursiveDelete, runHook, tick, write, write
protected TestRepository<FileRepository> tr
protected FileRepository repo
protected GC gc
protected GC.RepoStatistics stats
public void setUp() throws Exception
setUp
in class LocalDiskRepositoryTestCase
Exception
public void tearDown() throws Exception
tearDown
in class LocalDiskRepositoryTestCase
Exception
protected RevCommit commitChain(int depth) throws Exception
Each commit contains one file named "a" containing the index of the commit in the chain as its content. The created commit chain is referenced from any ref.
A chain of depth = N will create 3*N objects in Gits object database. For each depth level three objects are created: the commit object, the top-level tree object and a blob for the content of the file "a".
depth
- the depth of the commit chain.Exception
protected long lastModified(AnyObjectId objectId) throws IOException
IOException
protected static void fsTick() throws InterruptedException, IOException
InterruptedException
IOException
Copyright © 2016 Eclipse JGit Project. All rights reserved.