gerrit/gerrit-acceptance-tests
Dave Borowitz 96fe10508f ChangeRebuilderIT: Reopen ReviewDb when changing migration state
These tests commonly use methods on TestNotesMigration to play around
with the migration state. However, this wasn't taking into account
the fact that the migration state affects whether a ReviewDb opened
by the SchemaFactory is wrapped in a DisabledReviewDbChangesWrapper.

Unfortunately the request scope implementation used in tests caches
an open ReviewDb, meaning that depending on when the ReviewDb was
first opened, the cached value may be out of sync with the
TestNotesMigration state.

Work around this by always reopening the database, and ensuring the
returned Provider<ReviewDb> caches it as well, whenever the state
changes.

Change-Id: I1bfbbf5492f8232028eba969ace53cc659cb8c8b
2016-05-10 15:23:13 -07:00
..
src/test/java/com/google/gerrit/acceptance ChangeRebuilderIT: Reopen ReviewDb when changing migration state 2016-05-10 15:23:13 -07:00
BUCK Buck: Remove jgit cell 2016-04-20 22:02:49 +02:00
tests.defs Buck: Tweak unit test invocation and halve the run time 2015-10-16 08:25:43 +02:00