@Before public void setUp() { smtpServer = new Wiser(0); smtpServer.start(); configuration = mock(EmailSettings.class); underTest = new EmailNotificationChannel(configuration, null, null); }
@Before public void startWiser() { this.wiserPort = SocketUtils.findAvailableTcpPort(2500); wiser = new Wiser(); wiser.setPort(this.wiserPort); wiser.start(); LOGGER.info("Wiser was started."); }
public void setup() { final ChainedProperties props = ChainedProperties.getChainedProperties( "email.conf", ClassLoaderUtil.getClassLoader( null, getClass(), false )); wiser = new Wiser(); wiser.setHostname(props.getProperty( "mail.smtp.host", "localhost" )); wiser.setPort(Integer.parseInt(props.getProperty("mail.smtp.port", "2345"))); wiser.start(); try { Thread.sleep(1000); } catch (Throwable t) { // Do nothing } }
@Before public void setup() { final ChainedProperties props = ChainedProperties.getChainedProperties( "email.conf", ClassLoaderUtil.getClassLoader( null, getClass(), false )); wiser = new Wiser(); wiser.setHostname(props.getProperty("mail.smtp.host", "localhost")); wiser.setPort(Integer.parseInt(props.getProperty("mail.smtp.port", "2345"))); wiser.start(); try { Thread.sleep(1000); } catch (Throwable t) { // Do nothing } pds = setupPoolingDataSource(); emf = Persistence.createEntityManagerFactory("org.jbpm.services.task"); this.taskService = (InternalTaskService) HumanTaskServiceFactory.newTaskServiceConfigurator() .entityManagerFactory(emf) .getTaskService(); }
@Override protected void setUp() throws Exception { super.setUp(); int port = processEngineConfiguration.getMailServerPort(); boolean serverUpAndRunning = false; while (!serverUpAndRunning) { wiser = new Wiser(); wiser.setPort(port); try { LOG.info("Starting Wiser mail server on port: " + port); wiser.start(); serverUpAndRunning = true; LOG.info("Wiser mail server listening on port: " + port); } catch (RuntimeException e) { // Fix for slow port-closing Jenkins if (e.getMessage().toLowerCase().contains("BindException")) { Thread.sleep(250L); } } } }
public static Wiser create(Builder builder) { return new Wiser(builder, ACCEPTER_DEFAULT); }
/** A main() for this class. Starts up the server. */ public static void main(String[] args) throws Exception { Wiser wiser = new Wiser(); wiser.start(); }
/** A main() for this class. Starts up the server. */ public static void main(String[] args) throws Exception { Wiser wiser = new Wiser(); wiser.start(); }
/** A main() for this class. Starts up the server. */ public static void main(String[] args) throws Exception { Wiser wiser = new Wiser(); wiser.start(); }
public Wiser port(int port) { this.server = SMTPServer.port(port); return new Wiser(server, accepter); }
public void doTest() throws Exception { Wiser wiser = new Wiser(); SMTPServer smtpServer = createServer(new SimpleMessageListenerAdapter(wiser)); smtpServer.setHostName("localhost"); smtpServer.setPort(5000); TestPluginLifeCycle lifeCycle = createLifeCycle(); try { lifeCycle.start(); smtpServer.start(); execute(lifeCycle, wiser); } finally { smtpServer.stop(); lifeCycle.stop(); } } }
/** * @see org.unitils.mail.SmtpServer#clean() */ @Override public void clean() { wiser.stop(); wiser = new Wiser(); wiser.setPort(port); wiser.start(); }
@Before("@emailing") public void startUpServer() { smtpServer = new Wiser(getSmtpPort()); smtpServer.start(); }
@Before public void setUp() throws Exception { uniqueTestNum = random.nextInt(Integer.MAX_VALUE); emailHost = "localhost"; int emailPortInt; do { emailPortInt = random.nextInt((2*Short.MAX_VALUE-1)); } while( emailPortInt < 4096 ); emailPort = Integer.toString(emailPortInt); wiser = new Wiser(Integer.parseInt(emailPort)); wiser.start(); }
/** * @param port : the port where the server should be started on. */ public SmtpServerImpl(int port) { this.port = port; wiser = new Wiser(); wiser.setPort(port); wiser.start(); wiser.getServer().isRunning(); }
@Before public void startSMTP() { wiser = new Wiser(); wiser.setPort(1587); wiser.start(); }
@BeforeClass static public void beforeClass() { WISER = new Wiser(); WISER.setPort(DIFF); WISER.start(); }
@Before public void setUp() throws Exception { System.setProperty("org.jbpm.email.templates.dir", new File("src/test/resources/templates").getAbsolutePath()); TemplateManager.reset(); ChainedProperties props = ChainedProperties.getChainedProperties( "email.conf", ClassLoaderUtil.getClassLoader( null, getClass(), false )); emailHost = props.getProperty( "mail.smtp.host", "localhost" ); emailPort = props.getProperty( "mail.smtp.port", "2345" ); wiser = new Wiser(); wiser.setHostname( emailHost ); wiser.setPort( Integer.parseInt( emailPort ) ); wiser.start(); Thread.sleep(200); }
@Before public void startWiser() { wiser = new Wiser(); wiser.setHostname(SMTP_HOST); wiser.setPort(SMTP_PORT); wiser.start(); }
@Override @Before public void setUp() throws Exception { super.setUp(); wiser = new Wiser(); wiser.setPort(2500); wiser.start(); startHttpServer(); }