Run most acceptance tests in-memory

This allows the tests to run faster, with lower system overheads.
The new @UseLocalDisk annotation must be added to any test method
that wants the classical init and daemon testing strategy.

A new sshd.requestLog configuration variable is introduced to
permit tests to disable the SSH command log.

Timing for `buck test --all` on my Linux desktop:

  before 3m37.129s
  after  2m18.789s

Change-Id: I18c07ef2d913f6abbb3925b3e7d3df5d28668497
This commit is contained in:
Shawn Pearce
2013-10-17 22:15:38 -07:00
parent b23dcfdedc
commit 318bfcae5c
19 changed files with 362 additions and 98 deletions

View File

@@ -17,6 +17,7 @@ package com.google.gerrit.server.schema;
import com.google.gerrit.reviewdb.client.Project;
import com.google.gerrit.reviewdb.client.SystemConfig;
import com.google.gerrit.reviewdb.server.ReviewDb;
import com.google.gerrit.server.git.GitRepositoryManager;
import com.google.gerrit.server.git.LocalDiskRepositoryManager;
import com.google.gwtorm.server.OrmException;
import com.google.inject.Inject;
@@ -30,10 +31,10 @@ import java.io.File;
import java.util.Collections;
public class Schema_55 extends SchemaVersion {
private final LocalDiskRepositoryManager mgr;
private final GitRepositoryManager mgr;
@Inject
Schema_55(Provider<Schema_54> prior, LocalDiskRepositoryManager mgr) {
Schema_55(Provider<Schema_54> prior, GitRepositoryManager mgr) {
super(prior);
this.mgr = mgr;
}
@@ -46,7 +47,7 @@ public class Schema_55 extends SchemaVersion {
if ("-- All Projects --".equals(oldName)) {
ui.message("Renaming \"" + oldName + "\" to \"" + newName + "\"");
File base = mgr.getBasePath();
File base = ((LocalDiskRepositoryManager) mgr).getBasePath();
File oldDir = FileKey.resolve(new File(base, oldName), FS.DETECTED);
File newDir = new File(base, newName + Constants.DOT_GIT_EXT);
if (!oldDir.renameTo(newDir)) {