UkelonnLiquibase { public void forceReleaseLocks(Connection connect) throws LiquibaseException { DatabaseConnection databaseConnection = new JdbcConnection(connect); ClassLoaderResourceAccessor classLoaderResourceAccessor = new ClassLoaderResourceAccessor(getClass().getClassLoader()); Liquibase liquibase = new Liquibase("ukelonn-db-changelog/db-changelog-1.0.0.xml", classLoaderResourceAccessor, databaseConnection); liquibase.forceReleaseLocks(); }  void createInitialSchema(Connection connect); void updateSchema(Connection connect); void forceReleaseLocks(Connection connect);  }
@Test public void testForceReleaseLocks() throws Exception { try(Connection connection = createConnection()) { UkelonnLiquibase handleregLiquibase = new UkelonnLiquibase(); handleregLiquibase.forceReleaseLocks(connection); } try(Connection connection = createConnection()) { try(PreparedStatement statement = connection.prepareStatement("select * from databasechangeloglock")) { try(ResultSet results = statement.executeQuery()) { boolean locked = true; while(results.next()) { locked = results.getBoolean("locked"); } assertFalse(locked); } } } }