diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportOfficeData.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportOfficeData.java index 5bdacaab..a33d6be4 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportOfficeData.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportOfficeData.java @@ -134,6 +134,15 @@ public class ImportOfficeData extends CsvDataImport { static Map coopShares = new WriteOnceMap<>(); static Map coopAssets = new WriteOnceMap<>(); + @Test + @Order(1) + void verifyInitialDatabase() { + // SQL DELETE for thousands of records takes too long, so we make sure, we only start with initial or test data + final var contactCount = (Integer) em.createNativeQuery("select count(*) from hs_office_contact", Integer.class) + .getSingleResult(); + assertThat(contactCount).isLessThan(20); + } + @Test @Order(1010) void importBusinessPartners() {