Skip to content

Commit fb1c118

Browse files
committed
Fix HibernatePropertiesTest and make failure more expressive
1 parent b808b47 commit fb1c118

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

integration-tests/smallrye-config/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ DOTENV_SERVER_PORT=8080
33

44
QUARKUS_DATASOURCE_DB_KIND=h2
55
QUARKUS_DATASOURCE_JDBC_URL=jdbc:h2:mem:test;MODE=PostgreSQL;DB_CLOSE_DELAY=-1
6-
QUARKUS_HIBERNATE_ORM_DATABASE_GENERATION=drop-and-create
6+
QUARKUS_HIBERNATE_ORM_SCHEMA_MANAGEMENT_STRATEGY=drop-and-create

integration-tests/smallrye-config/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@
7474
<artifactId>rest-assured</artifactId>
7575
<scope>test</scope>
7676
</dependency>
77+
<dependency>
78+
<groupId>org.assertj</groupId>
79+
<artifactId>assertj-core</artifactId>
80+
<scope>test</scope>
81+
</dependency>
7782

7883
<!-- Minimal test dependencies to *-deployment artifacts for consistent build order -->
7984
<dependency>

integration-tests/smallrye-config/src/test/java/io/quarkus/it/smallrye/config/HibernatePropertiesTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import static io.restassured.RestAssured.given;
44
import static jakarta.ws.rs.core.Response.Status.OK;
5-
import static org.junit.jupiter.api.Assertions.assertTrue;
5+
import static org.assertj.core.api.Assertions.assertThat;
66

77
import java.util.logging.Level;
88
import java.util.logging.LogManager;
@@ -29,7 +29,8 @@ record -> record.getLevel().intValue() >= Level.WARNING.intValue());
2929
@Override
3030
public void beforeAll(final ExtensionContext context) throws Exception {
3131
super.beforeAll(context);
32-
assertTrue(inMemoryLogHandler.getRecords().isEmpty());
32+
assertThat(inMemoryLogHandler.getRecords().stream().map(r -> String.format(r.getMessage(), r.getParameters())))
33+
.isEmpty();
3334
}
3435
};
3536

0 commit comments

Comments
 (0)