use of org.flywaydb.core.internal.util.logging.StringLogCreator in project flyway by flyway.
the class FlywayMediumTest method failed.
@Test
public void failed() {
StringLogCreator logCreator = new StringLogCreator();
LogFactory.setLogCreator(logCreator);
try {
Flyway flyway = new Flyway();
flyway.setDataSource("jdbc:h2:mem:flyway_failed;DB_CLOSE_DELAY=-1", "sa", "");
flyway.setLocations("migration/failed");
flyway.migrate();
fail();
} catch (FlywayException e) {
System.out.println(logCreator.getOutput());
} finally {
LogFactory.setLogCreator(null);
}
}
Aggregations