f893c4f87c
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 |
||
---|---|---|
.. | ||
src/test/java/com/google/gerrit/acceptance | ||
BUCK | ||
tests.defs |