gerrit/gerrit-launcher
Dave Borowitz d3ee31c0cf StandaloneSiteTest: Ignore user and system git config
Override SystemReader to return empty files for the user and system
config. This makes StandaloneNoteDbMigrationIT pass regardless of the
configuration of the system it's running on.

This has to happen in StandaloneSiteTest prior to site initialization,
since the SystemReader is queried at FileRepository creation time, and
Gerrit by design holds all created repos open in the RepositoryCache. If
we tried to override the SystemReader in a test, it would have no
effect, because the cached repos would already have the wrong config
files loaded.

Another complication is that GerritLauncher#mainImpl was creating a new
classloader for every invocation, meaning the SystemReader class used by
the wrapper code in StandaloneSiteTest was not the same class instance
seen by the tests. Fix this by explicitly passing a ClassLoader when
running.

Change-Id: I478f3f712bced530c87b8fac3422275ec93d3557
2018-03-20 10:45:26 -04:00
..
src/main/java/com/google/gerrit/launcher StandaloneSiteTest: Ignore user and system git config 2018-03-20 10:45:26 -04:00
BUILD Bazel: Reformat build files 2016-12-07 11:33:07 +00:00