You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2019/02/19 11:35:11 UTC
[syncope] branch master updated: Stabilizing notification tests
This is an automated email from the ASF dual-hosted git repository.
ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/master by this push:
new 876da51 Stabilizing notification tests
876da51 is described below
commit 876da51f3d006dcd581611d3825a40c4e9ae4a5b
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Tue Feb 19 12:03:04 2019 +0100
Stabilizing notification tests
---
fit/build-tools/pom.xml | 4 ----
.../java/com/icegreen/greenmail/smtp/InterruptableSmtpServer.java | 5 ++---
.../apache/syncope/fit/core/AbstractNotificationTaskITCase.java | 8 +++++++-
fit/core-reference/src/{main => test}/resources/mail.properties | 0
pom.xml | 6 +++++-
5 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/fit/build-tools/pom.xml b/fit/build-tools/pom.xml
index 1c16c39..1646a64 100644
--- a/fit/build-tools/pom.xml
+++ b/fit/build-tools/pom.xml
@@ -64,10 +64,6 @@ under the License.
</dependency>
<dependency>
<groupId>org.apache.directory.server</groupId>
- <artifactId>apacheds-core-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.directory.server</groupId>
<artifactId>apacheds-service-builder</artifactId>
</dependency>
<dependency>
diff --git a/fit/build-tools/src/main/java/com/icegreen/greenmail/smtp/InterruptableSmtpServer.java b/fit/build-tools/src/main/java/com/icegreen/greenmail/smtp/InterruptableSmtpServer.java
index ca9e0af..5a1d2b3 100644
--- a/fit/build-tools/src/main/java/com/icegreen/greenmail/smtp/InterruptableSmtpServer.java
+++ b/fit/build-tools/src/main/java/com/icegreen/greenmail/smtp/InterruptableSmtpServer.java
@@ -41,10 +41,9 @@ public class InterruptableSmtpServer extends SmtpServer {
} catch (IOException e) {
// ignore
}
- return null;
- } else {
- return super.createProtocolHandler(clientSocket);
}
+
+ return super.createProtocolHandler(clientSocket);
}
}
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractNotificationTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractNotificationTaskITCase.java
index 49d46ad..5cf2076 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractNotificationTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractNotificationTaskITCase.java
@@ -51,7 +51,9 @@ public abstract class AbstractNotificationTaskITCase extends AbstractTaskITCase
private boolean pop3(final String sender, final String subject, final String mailAddress) throws Exception {
boolean found = false;
- try (Store store = Session.getDefaultInstance(System.getProperties()).getStore("pop3")) {
+ Store store = null;
+ try {
+ store = Session.getDefaultInstance(System.getProperties()).getStore("pop3");
store.connect(POP3_HOST, POP3_PORT, mailAddress, mailAddress);
Folder inbox = store.getFolder("INBOX");
@@ -67,6 +69,10 @@ public abstract class AbstractNotificationTaskITCase extends AbstractTaskITCase
}
inbox.close(true);
+ } finally {
+ if (store != null) {
+ store.close();
+ }
}
return found;
}
diff --git a/fit/core-reference/src/main/resources/mail.properties b/fit/core-reference/src/test/resources/mail.properties
similarity index 100%
rename from fit/core-reference/src/main/resources/mail.properties
rename to fit/core-reference/src/test/resources/mail.properties
diff --git a/pom.xml b/pom.xml
index 6b7925a..64d7dc6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1343,6 +1343,10 @@ under the License.
<artifactId>activation</artifactId>
</exclusion>
<exclusion>
+ <groupId>com.sun.mail</groupId>
+ <artifactId>javax.mail</artifactId>
+ </exclusion>
+ <exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
@@ -2470,7 +2474,7 @@ under the License.
<link>http://www.flowable.org/docs/javadocs/</link>
<link>https://build.shibboleth.net/nexus/content/sites/site/java-opensaml/3.3.0/apidocs/</link>
<link>https://artifacts.elastic.co/javadoc/org/elasticsearch/elasticsearch/6.6.0/index.html</link>
- <link>http://docs.swagger.io/swagger-core/v2.0.6/apidocs/</link>
+ <link>http://docs.swagger.io/swagger-core/v2.0.7/apidocs/</link>
</links>
</configuration>
<reportSets>