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.
This commit is contained in:
Oliver Drotbohm
2022-10-21 10:09:46 +02:00
parent badea787f0
commit f82cc11562

View File

@@ -63,7 +63,7 @@ class DatabaseSchemaInitializerIntegrationTests {
@Test // GH-3
void shouldCreateDatabaseSchemaOnStartUp() {
assertThat(operations.queryForObject(COUNT_PUBLICATIONS, Long.class)).isEqualTo(0);
assertThatNoException().isThrownBy(() -> operations.queryForObject(COUNT_PUBLICATIONS, Long.class));
}
}