gerrit/gerrit-acceptance-tests
Dave Borowitz c02898db13 Reuse running daemon in AbstractDaemonTest
Maintain a single common daemon per test runner, and reuse it without
additional modification wherever possible. Associate each server with
an immutable Description class, and use a new, custom daemon when the
Description corresponding to the test class does not match the
Description corresponding to the method.

Some unscientific benchmarks, running tests after a full build.

On my workstation (HP Z420, 12 cores, 32G RAM, SSD):
  buck test --no-results-cache
    before: 4:37.88
    after:  3:22.36
  ChangeIT in Eclipse
    before: 26.153s
    after:  12.512s

On my laptop (11" MBA, 4 cores, 8G RAM, SSD):
  buck test --no-results-cache
    before: 15:34.28
    after:  11:34.93
  ChangeIT in Eclipse
    before: 30.903s
    after:  19.11s

We still pay a significant startup cost (~6-12s for the server), and
contention during buck test with default -j is an issue (3-5x increase
in time per test). But a 50%/25% reduction in single/aggregate test
time is nothing to sneeze at.

There is still plenty of low-hanging fruit that can take better
advantage of the per-test-class savings, like consolidating more
groups of integration tests together and removing HTTP dependencies.

Change-Id: I23b8d0e9839120a07a3fe1230f19184dc910682c
2015-04-02 15:35:44 -07:00
..
src/test/java/com/google/gerrit/acceptance Reuse running daemon in AbstractDaemonTest 2015-04-02 15:35:44 -07:00
BUCK Reuse running daemon in AbstractDaemonTest 2015-04-02 15:35:44 -07:00
tests.defs tests: Use insecure random for acceptance tests 2014-04-24 08:30:43 +02:00