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

    tempAllocator.dispose();
  }
Ejemplo n.º 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();
 }