Skip to content

Commit 8c9695e

Browse files
committed
Update Liquibase
1 parent 2378344 commit 8c9695e

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

build.gradle

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ ext {
4141
[name: 'no_sb', flyway: 'default', 'flyway-test': 'default', 'zonky-postgres': 'default']
4242
]],
4343
[name: 'liquibase', versions: [
44-
[name: '3.5.5', liquibase: '3.5.5', spring: '4.3.30.RELEASE', 'spring-boot': '1.5.22.RELEASE'],
45-
[name: '3.6.3', liquibase: '3.6.3', spring: '5.1.20.RELEASE', 'spring-boot': '2.1.18.RELEASE'],
46-
[name: '3.7.0', liquibase: '3.7.0', spring: '5.1.20.RELEASE', 'spring-boot': '2.1.18.RELEASE'],
47-
[name: '3.8.9', liquibase: '3.8.9', spring: '5.2.22.RELEASE', 'spring-boot': '2.2.13.RELEASE'],
48-
[name: '3.9.0', liquibase: '3.9.0', spring: '5.2.22.RELEASE', 'spring-boot': '2.2.13.RELEASE'],
49-
[name: '3.10.3', liquibase: '3.10.3', spring: '5.3.13', 'spring-boot': '2.4.13'],
50-
[name: '4.4.3', liquibase: '4.4.3', spring: '5.3.27', 'spring-boot': '2.5.15'],
51-
[name: '4.5.0', liquibase: '4.5.0', spring: '5.3.27', 'spring-boot': '2.6.15'],
44+
// [name: '3.5.5', liquibase: '3.5.5', spring: '4.3.30.RELEASE', 'spring-boot': '1.5.22.RELEASE'],
45+
// [name: '3.6.3', liquibase: '3.6.3', spring: '5.1.20.RELEASE', 'spring-boot': '2.1.18.RELEASE'],
46+
// [name: '3.7.0', liquibase: '3.7.0', spring: '5.1.20.RELEASE', 'spring-boot': '2.1.18.RELEASE'],
47+
// [name: '3.8.9', liquibase: '3.8.9', spring: '5.2.22.RELEASE', 'spring-boot': '2.2.13.RELEASE'],
48+
// [name: '3.9.0', liquibase: '3.9.0', spring: '5.2.22.RELEASE', 'spring-boot': '2.2.13.RELEASE'],
49+
// [name: '3.10.3', liquibase: '3.10.3', spring: '5.3.13', 'spring-boot': '2.4.13'],
50+
// [name: '4.4.3', liquibase: '4.4.3', spring: '5.3.27', 'spring-boot': '2.5.15'],
51+
// [name: '4.5.0', liquibase: '4.5.0', spring: '5.3.27', 'spring-boot': '2.6.15'],
5252
[name: '4.9.1', liquibase: '4.9.1', spring: '5.3.31', 'spring-boot': '2.7.18'],
5353
[name: 'no_sb', liquibase: 'default']
5454
]],
@@ -280,7 +280,7 @@ project(':embedded-database-spring-test') {
280280
optImplementation('org.springframework.boot:spring-boot-starter-test:2.7.18') {
281281
exclude group: 'org.mockito'
282282
}
283-
optImplementation 'org.liquibase:liquibase-core:3.10.3'
283+
optImplementation 'org.liquibase:liquibase-core:4.9.1'
284284

285285
api 'org.springframework:spring-context:5.3.31'
286286
api 'org.springframework:spring-test:5.3.31'

embedded-database-spring-test/src/main/java/io/zonky/test/db/liquibase/LiquibaseDatabasePreparer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ protected InputStream openChangeLogStream(String changeLogPath) throws IOExcepti
116116
SpringLiquibase springLiquibase = new SpringLiquibase();
117117
springLiquibase.setResourceLoader(descriptor.getResourceLoader());
118118
if (ClassUtils.isPresent("liquibase.integration.spring.SpringLiquibase$SpringResourceOpener", null)) {
119-
SpringLiquibase.SpringResourceOpener resourceAccessor = springLiquibase.new SpringResourceOpener(descriptor.getChangeLog());
120-
return StreamUtil.singleInputStream(changeLogPath, resourceAccessor);
119+
return StreamUtil.openStream(changeLogPath, null, null, null);
121120
} else if (ClassUtils.isPresent("liquibase.integration.spring.SpringLiquibase$SpringResourceAccessor", null)) {
122121
Object resourceAccessor = ReflectionUtils.invokeConstructor("liquibase.integration.spring.SpringLiquibase$SpringResourceAccessor", springLiquibase);
123122
return ReflectionUtils.invokeMethod(resourceAccessor, "openStream", null, changeLogPath);

embedded-database-spring-test/src/test/java/io/zonky/test/db/LiquibaseRefreshIntegrationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ public void afterTestClass(TestContext testContext) {
100100
DatabaseContext databaseContext = applicationContext.getBean(DatabaseContext.class);
101101
DatabaseProvider databaseProvider = applicationContext.getBean("dockerPostgresDatabaseProvider", DatabaseProvider.class);
102102

103-
verify(databaseContext, times(4)).reset();
103+
verify(databaseContext, times(2)).reset();
104104
verify(databaseContext, times(1)).apply(any());
105-
verify(databaseProvider, times(3)).createDatabase(any());
105+
verify(databaseProvider, times(1)).createDatabase(any());
106106

107107
Mockito.reset(databaseContext, databaseProvider);
108108
}

0 commit comments

Comments
 (0)