I’m having a problem with my unit tests. Regardless of what I do, my liquibase.logLevel
setting isn’t being respected. Any suggestions? Thanks!
@Test
public void testChangeLog() {
try (Connection appUserConnection = getAppUserConnection())
{
Map<String, Object> config = new HashMap<>();
config.put("liquibase.logLevel", "INFO");
config.put("liquibase.liquibaseSchemaName", liquibaseSchema);
Scope.child(config, () -> {
Liquibase liquibase = new Liquibase(getChangeLogFile(), new ClassLoaderResourceAccessor(), new JdbcConnection(appUserConnection));
liquibase.updateTestingRollback(getContexts());
});
} catch (Exception e) {
throw new RuntimeException(e);
}
}
Here’s what I have in my pom file:
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-classic -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.4.5</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.mattbertolini/liquibase-slf4j -->
<dependency>
<groupId>com.mattbertolini</groupId>
<artifactId>liquibase-slf4j</artifactId>
<version>4.1.0</version>
<scope>test</scope>
</dependency>
(topic deleted by author)