gerrit/gerrit-acceptance-tests/BUCK
Dave Borowitz f893c4f87c Use TestProtocol to clone in-process for AbstractDaemonTest
This new JGit feature associates a particular request object with a
URL and processes all git protocol requests in-memory in a separate
thread. For acceptance tests, this request object also describes a
request scope context, such that each connection runs in its own
connection thread with its own Guice request context.

The TestProtocol instance uses custom Upload/ReceivePackFactory
implementations that parallel the implementations within the HTTP and
SSH code paths. On the one hand, this is yet another implementation
that must be modified when changing the git filter stack, but on the
other hand, there were already multiple stacks to begin with. In this
case, I think the performance improvement is also worth the cost.

With this change, single acceptance test methods can run in about
100ms even on my Macbook Air. Startup cost is still relatively high
due to server initialization, but this change opens the door to
reducing that well by removing HTTP and SSH servers from tests
entirely.

Change-Id: Icddd7d2ac448ea3f59909f8ef61f95feb1d67b64
2015-04-13 08:24:21 -04:00

48 lines
1.2 KiB
Python

java_library(
name = 'lib',
srcs = glob(['src/test/java/com/google/gerrit/acceptance/*.java']),
exported_deps = [
'//gerrit-common:annotations',
'//gerrit-common:server',
'//gerrit-extension-api:api',
'//gerrit-launcher:launcher',
'//gerrit-lucene:lucene',
'//gerrit-httpd:httpd',
'//gerrit-pgm:init',
'//gerrit-pgm:pgm',
'//gerrit-pgm:util',
'//gerrit-reviewdb:server',
'//gerrit-server:server',
'//gerrit-server/src/main/prolog:common',
'//gerrit-server:testutil',
'//gerrit-sshd:sshd',
'//lib:args4j',
'//lib:gson',
'//lib:guava',
'//lib:gwtjsonrpc',
'//lib:gwtorm',
'//lib:h2',
'//lib:jsch',
'//lib:junit',
'//lib:servlet-api-3_1',
'//lib:truth',
'//lib/auto:auto-value',
'//lib/httpcomponents:httpclient',
'//lib/httpcomponents:httpcore',
'//lib/log:impl_log4j',
'//lib/log:log4j',
'//lib/guice:guice',
'//lib/guice:guice-assistedinject',
'//lib/guice:guice-servlet',
'//lib/jgit:jgit',
'//lib/jgit:junit',
'//lib/mina:sshd',
],
visibility = [
'//tools/eclipse:classpath',
'//gerrit-acceptance-tests/...',
],
)