diff --git a/echo-notifications/echo-notifications.gradle b/echo-notifications/echo-notifications.gradle index 0daee20d2..8eb8f9f05 100644 --- a/echo-notifications/echo-notifications.gradle +++ b/echo-notifications/echo-notifications.gradle @@ -45,10 +45,9 @@ dependencies { implementation "io.cloudevents:cloudevents-http-basic:2.5.0" implementation "io.cloudevents:cloudevents-json-jackson:2.5.0" implementation ("dev.cdevents:cdevents-sdk-java:0.1.2") - testImplementation("com.icegreen:greenmail:1.5.14") { - exclude group: "com.sun.mail", module: "javax.mail" - } implementation "org.apache.groovy:groovy:4.0.9" + + testImplementation "com.icegreen:greenmail:2.0.1" testImplementation "org.apache.httpcomponents:httpclient" testImplementation "org.spockframework:spock-spring" testImplementation "org.springframework:spring-test" diff --git a/echo-notifications/src/test/groovy/com/netflix/spinnaker/echo/email/EmailNotificationServiceSpec.groovy b/echo-notifications/src/test/groovy/com/netflix/spinnaker/echo/email/EmailNotificationServiceSpec.groovy index 476808641..c84366332 100644 --- a/echo-notifications/src/test/groovy/com/netflix/spinnaker/echo/email/EmailNotificationServiceSpec.groovy +++ b/echo-notifications/src/test/groovy/com/netflix/spinnaker/echo/email/EmailNotificationServiceSpec.groovy @@ -22,6 +22,7 @@ import com.icegreen.greenmail.util.GreenMailUtil import com.icegreen.greenmail.util.ServerSetupTest import com.netflix.spinnaker.echo.api.Notification import com.netflix.spinnaker.echo.notification.NotificationTemplateEngine +import jakarta.mail.Message import jakarta.mail.internet.MimeMessage import org.springframework.mail.javamail.JavaMailSenderImpl import spock.lang.Shared @@ -29,9 +30,7 @@ import spock.lang.Specification import spock.lang.Subject import spock.lang.Unroll - - -class EmailNotificationServiceSpec { /*extends Specification +class EmailNotificationServiceSpec extends Specification { def notificationTemplateEngine = Mock(NotificationTemplateEngine) @Shared @@ -97,5 +96,5 @@ class EmailNotificationServiceSpec { /*extends Specification ['receiver@localhost another@localhost'] | ['some-addr@localhost some-other-addr@localhost'] || ['receiver@localhost', 'another@localhost'] || ['some-addr@localhost', 'some-other-addr@localhost'] ['receiver@localhost,another@localhost'] | ['some-addr@localhost,some-other-addr@localhost'] || ['receiver@localhost', 'another@localhost'] || ['some-addr@localhost', 'some-other-addr@localhost'] ['receiver@localhost; another@localhost'] | ['some-addr@localhost, some-other-addr@localhost'] || ['receiver@localhost', 'another@localhost'] || ['some-addr@localhost', 'some-other-addr@localhost'] - }*/ + } } diff --git a/echo-web/src/test/java/com/netflix/spinnaker/echo/ApplicationSpec.java b/echo-web/src/test/java/com/netflix/spinnaker/echo/ApplicationSpec.java index c83a544f5..42e47b204 100644 --- a/echo-web/src/test/java/com/netflix/spinnaker/echo/ApplicationSpec.java +++ b/echo-web/src/test/java/com/netflix/spinnaker/echo/ApplicationSpec.java @@ -20,12 +20,12 @@ import com.netflix.spinnaker.echo.services.Front50Service; import com.netflix.spinnaker.fiat.shared.FiatService; import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; -/*@ExtendWith(SpringExtension.class) -@SpringBootTest(classes = {Application.class})*/ +@SpringBootTest(classes = {Application.class}) @ContextConfiguration(classes = {Application.class}) @TestPropertySource(properties = {"spring.config.location=classpath:echo-test.yml"}) public class ApplicationSpec { diff --git a/gradle.properties b/gradle.properties index 44351deed..92e559055 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,3 +18,5 @@ spinnakerGradleVersion=1-0-SNAPSHOT # #fiatComposite=true #korkComposite=true + +org.gradle.jvmargs=-Xmx2g -Xms2g