OnlineNoteDbMigrationIT: Add missing fail when exception is not thrown

Error Prone reports:

  [MissingFail] Not calling fail() when expecting an exception masks bugs

Add the missing fail. Also increase the severity of the MissingFail
warning to ERROR, to prevent reoccurrences.

Change-Id: I232cadac47cfd091d3157942a4552f47b2e5bcf9
This commit is contained in:
David Pursehouse 2019-07-09 11:43:05 +09:00
parent 86ac26d294
commit 2f44c1dede

View File

@ -645,6 +645,7 @@ public class OnlineNoteDbMigrationIT extends AbstractDaemonTest {
String expectMessageContains, PrepareBuilder b, RunMigration m) throws Exception {
try {
migrate(b, m);
assert_().fail("expected MigrationException");
} catch (MigrationException e) {
assertThat(e).hasMessageThat().contains(expectMessageContains);
}