When we converted ReceiveCommits to use BatchUpdate's parallel
functionality in I40545a4d, we lost the automatic request scope
propagation. This was mostly fine, with the notable exception of:
- pushing a new patch set of an existing change, and
- pushing multiple changes so work is in a background thread, and
- mentioning a user in a footer (Signed-Off-By, etc.), and
- not including an email address in that footer, and
- not having the account index enabled.
This would cause AccountResolver to try to call its
Provider<ReviewDb>, which fails because it's not in request scope.
Fix this by passing a ReviewDb into AccountResolver methods. That was
the easy part; the hard part was figuring out how to write a test case
that triggered this. Since the account index is now enabled by
default, this means putting a test-only hack into LuceneIndexModule
to support disabling a specific index. (This could also be useful for
other tests, since we currently don't exercise the non-index
fallbacks.)
Change-Id: I7231be3ea4660c9ee27f09994706b39ee622488a