Skip to content

Commit b4de03c

Browse files
committed
New version
1 parent 7d3d460 commit b4de03c

File tree

3 files changed

+28
-25
lines changed

3 files changed

+28
-25
lines changed

common-internal-bom/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies {
1212
api(platform("org.assertj:assertj-bom:3.26.3"))
1313
api(platform("org.testcontainers:testcontainers-bom:1.20.3"))
1414
api(platform("org.junit:junit-bom:5.11.3"))
15-
api(platform("io.github.mfvanek:pg-index-health-bom:0.13.1"))
15+
api(platform("io.github.mfvanek:pg-index-health-bom:0.13.2"))
1616

1717
constraints {
1818
api("org.liquibase:liquibase-core:4.29.2")

spring-boot-2-demo-app/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ dependencies {
2121

2222
implementation("org.springframework.kafka:spring-kafka")
2323
implementation("io.opentelemetry:opentelemetry-exporter-otlp")
24-
implementation("org.springframework.cloud:spring-cloud-starter-sleuth") {
24+
implementation("org.springframework.cloud:spring-cloud-starter-sleuth:3.1.11") {
25+
because("The version is higher than in BOM")
2526
exclude(group = "org.springframework.cloud", module = "spring-cloud-sleuth-brave")
2627
}
2728
implementation("org.springframework.cloud:spring-cloud-sleuth-otel-autoconfigure")

spring-boot-2-demo-app/src/test/java/io/github/mfvanek/spring/boot2/test/IndexesMaintenanceTest.java

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,33 +25,35 @@ class IndexesMaintenanceTest extends TestBase {
2525
void checkPostgresVersion() {
2626
final String pgVersion = jdbcTemplate.queryForObject("select version();", String.class);
2727
assertThat(pgVersion)
28-
.startsWith("PostgreSQL 16.4");
28+
.startsWith("PostgreSQL 16.4");
2929
}
3030

3131
@Test
3232
void databaseStructureCheckForPublicSchema() {
3333
assertThat(checks)
34-
.hasSameSizeAs(Diagnostic.values());
35-
36-
checks.forEach(check -> {
37-
switch (check.getDiagnostic()) {
38-
case TABLES_WITHOUT_PRIMARY_KEY, TABLES_WITHOUT_DESCRIPTION -> assertThat(check.check())
39-
.asInstanceOf(list(Table.class))
40-
.hasSize(1)
41-
.containsExactly(Table.of("databasechangelog", 0L));
42-
43-
case COLUMNS_WITHOUT_DESCRIPTION -> assertThat(check.check())
44-
.asInstanceOf(list(Column.class))
45-
.hasSize(14)
46-
.allSatisfy(column -> assertThat(column.getTableName()).isEqualTo("databasechangelog"));
47-
48-
case TABLES_WITH_MISSING_INDEXES -> assertThat(check.check())
49-
.hasSizeLessThanOrEqualTo(1); // TODO skip runtime checks after https://github.com/mfvanek/pg-index-health/issues/456
50-
51-
default -> assertThat(check.check())
52-
.as(check.getDiagnostic().name())
53-
.isEmpty();
54-
}
55-
});
34+
.hasSameSizeAs(Diagnostic.values());
35+
36+
checks.stream()
37+
.filter(DatabaseCheckOnHost::isStatic)
38+
.forEach(check -> {
39+
switch (check.getDiagnostic()) {
40+
case TABLES_WITHOUT_PRIMARY_KEY, TABLES_WITHOUT_DESCRIPTION -> assertThat(check.check())
41+
.asInstanceOf(list(Table.class))
42+
.hasSize(1)
43+
.containsExactly(Table.of("databasechangelog", 0L));
44+
45+
case COLUMNS_WITHOUT_DESCRIPTION -> assertThat(check.check())
46+
.asInstanceOf(list(Column.class))
47+
.hasSize(14)
48+
.allSatisfy(column -> assertThat(column.getTableName()).isEqualTo("databasechangelog"));
49+
50+
case TABLES_WITH_MISSING_INDEXES -> assertThat(check.check())
51+
.hasSizeLessThanOrEqualTo(1); // TODO skip runtime checks after https://github.com/mfvanek/pg-index-health/issues/456
52+
53+
default -> assertThat(check.check())
54+
.as(check.getDiagnostic().name())
55+
.isEmpty();
56+
}
57+
});
5658
}
5759
}

0 commit comments

Comments
 (0)