make sure that we don't delete thousands of records - rather start with a new db

This commit is contained in:
Michael Hoennig 2024-08-09 15:19:55 +02:00
parent 6b112df592
commit 6ddecbbfec

View File

@ -134,6 +134,15 @@ public class ImportOfficeData extends CsvDataImport {
static Map<Integer, HsOfficeCoopSharesTransactionEntity> coopShares = new WriteOnceMap<>();
static Map<Integer, HsOfficeCoopAssetsTransactionEntity> 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() {