diff --git a/src/main/resources/application-testing.properties b/src/main/resources/application-testing.properties index 532fccfa1..c974bc708 100644 --- a/src/main/resources/application-testing.properties +++ b/src/main/resources/application-testing.properties @@ -40,7 +40,7 @@ spring.liquibase.enabled=false spring.datasource.driver-class-name=org.h2.Driver spring.datasource.url=jdbc:h2:mem:db;DB_CLOSE_DELAY=-1 spring.sql.init.data-locations=classpath:database/UserServiceDatabase.sql -spring.datasource.data=classpath*:database/UserServiceDatabase.sql + spring.jpa.defer-datasource-initialization=true spring.jpa.generate-ddl=true spring.jpa.hibernate.dialect=org.hibernate.dialect.H2Dialect diff --git a/src/test/java/de/caritas/cob/userservice/api/admin/service/consultant/ConsultantAdminFilterServiceTenantAwareIT.java b/src/test/java/de/caritas/cob/userservice/api/admin/service/consultant/ConsultantAdminFilterServiceTenantAwareIT.java index f5b6da124..8fc964a83 100644 --- a/src/test/java/de/caritas/cob/userservice/api/admin/service/consultant/ConsultantAdminFilterServiceTenantAwareIT.java +++ b/src/test/java/de/caritas/cob/userservice/api/admin/service/consultant/ConsultantAdminFilterServiceTenantAwareIT.java @@ -11,20 +11,12 @@ import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase.Replace; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.jdbc.Sql; import org.springframework.transaction.annotation.Transactional; @SpringBootTest(classes = UserServiceApplication.class) @TestPropertySource(properties = "spring.profiles.active=testing") @AutoConfigureTestDatabase(replace = Replace.ANY) @TestPropertySource(properties = "multitenancy.enabled=false") -@TestPropertySource( - properties = - "spring.datasource.data=classpath*:database/UserServiceDatabase.sql,classpath*:database/transformDataForTenants.sql") -@TestPropertySource( - properties = - "spring.sql.init.data-locations=classpath:database/UserServiceDatabase.sql,classpath:database/transformDataForTenants.sql") -@Sql(scripts = {"classpath:database/transformDataForTenants.sql"}) @Transactional public class ConsultantAdminFilterServiceTenantAwareIT extends ConsultantAdminFilterServiceBase {