Skip to content

Commit f82cc11

Browse files
committed
GH-3 - Make tests for DatabaseSchemaInitializer more robust against execution order.
The tests previously asserted on no entries being found in the event publication tables. As other tests might have been run before, they could already contain some.
1 parent badea78 commit f82cc11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-modulith-events/spring-modulith-events-jdbc/src/test/java/org/springframework/modulith/events/jdbc/DatabaseSchemaInitializerIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void doesNotRegisterAnInitializerBean() {
6363

6464
@Test // GH-3
6565
void shouldCreateDatabaseSchemaOnStartUp() {
66-
assertThat(operations.queryForObject(COUNT_PUBLICATIONS, Long.class)).isEqualTo(0);
66+
assertThatNoException().isThrownBy(() -> operations.queryForObject(COUNT_PUBLICATIONS, Long.class));
6767
}
6868
}
6969

0 commit comments

Comments
 (0)