Skip to content

Commit

Permalink
SLING-6949 - Create testing utilities for email-enabled applications
Browse files Browse the repository at this point in the history
Log the SmptServerWrapper startup port

git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1798598 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
rombert committed Jun 13, 2017
1 parent bc95895 commit c96430c
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
import org.osgi.service.metatype.annotations.AttributeDefinition;
import org.osgi.service.metatype.annotations.Designate;
import org.osgi.service.metatype.annotations.ObjectClassDefinition;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.subethamail.smtp.server.SMTPServer;
import org.subethamail.wiser.Wiser;
import org.subethamail.wiser.WiserMessage;
Expand All @@ -40,6 +42,8 @@
@Designate(ocd = SmtpServerWrapper.Config.class)
public class SmtpServerWrapper {

private final Logger logger = LoggerFactory.getLogger(getClass());

@ObjectClassDefinition(name="Apache Sling Testing SMTP Server Wrapper")
public @interface Config {

Expand All @@ -65,6 +69,8 @@ public void activate(Config cfg) throws ReflectiveOperationException {
}

effectiveBindPort = bindPort;

logger.info("Started, Wiser listening on port {}", effectiveBindPort);
}

private int reflectiveGetEffectiveBindPort(SMTPServer server) throws ReflectiveOperationException {
Expand Down

0 comments on commit c96430c

Please sign in to comment.