From 3751522b1c3c66e761584e65916625f77dad35bf Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Sun, 18 Aug 2019 13:38:09 +0800 Subject: [PATCH] don't load scheduling during tests --- komga/src/main/kotlin/org/gotson/komga/Application.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/komga/src/main/kotlin/org/gotson/komga/Application.kt b/komga/src/main/kotlin/org/gotson/komga/Application.kt index 15d1fa3ed..444953c49 100644 --- a/komga/src/main/kotlin/org/gotson/komga/Application.kt +++ b/komga/src/main/kotlin/org/gotson/komga/Application.kt @@ -4,10 +4,11 @@ import org.gotson.komga.infrastructure.configuration.KomgaProperties import org.springframework.boot.autoconfigure.SpringBootApplication import org.springframework.boot.context.properties.EnableConfigurationProperties import org.springframework.boot.runApplication +import org.springframework.context.annotation.Configuration +import org.springframework.context.annotation.Profile import org.springframework.scheduling.annotation.EnableScheduling @SpringBootApplication -@EnableScheduling @EnableConfigurationProperties( KomgaProperties::class ) @@ -15,4 +16,9 @@ class Application fun main(args: Array) { runApplication(*args) -} \ No newline at end of file +} + +@Profile("!test") +@Configuration +@EnableScheduling +class SchedulingConfiguration \ No newline at end of file