예제 #1
0
  @After
  public void removeGitRepository() throws IOException, InterruptedException {
    if (isWindows()) {
      System.gc(); // Reduce Windows file busy exceptions cleaning up temp dirs
    }

    tempAllocator.dispose();
  }
예제 #2
0
 @Before
 public void createGitRepository() throws IOException, InterruptedException {
   tempAllocator = new TemporaryDirectoryAllocator();
   testGitDir = tempAllocator.allocate();
   TaskListener listener = StreamTaskListener.fromStderr();
   testGitClient = Git.with(listener, new EnvVars()).in(testGitDir).getClient();
   testGitClient.init();
 }