@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); } } } }
/** Convenience constructor */ public Wiser(int port) { this(); this.setPort(port); }
/** Convenience constructor */ public Wiser(int port) { this(); this.setPort(port); }
private void configureServer(int port, String host) { mailServer.setPort(port); try { mailServer.getServer().setBindAddress(InetAddress.getByName(host)); } catch (UnknownHostException e) { //if not a valid binding address then fall back to host name as listen address LOGGER.info("Invalid binding address, using it as hostname instead", e); mailServer.setHostname(host); } } }
Wiser wiser = new Wiser(); wiser.setPort(2500); wiser.start();
/** * @see org.unitils.mail.SmtpServer#clean() */ @Override public void clean() { wiser.stop(); wiser = new Wiser(); wiser.setPort(port); 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(); }
@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); } } } }
@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); }
@BeforeClass public void create() throws Exception { wiser = new Wiser(); wiser.setHostname("localhost"); wiser.setPort(25000); queryService = LensServices.get().getService(QueryExecutionService.NAME); Map<String, String> sessionconf = new HashMap<>(); sessionconf.put("test.session.key", "svalue"); sessionconf.put(LensConfConstants.QUERY_MAIL_NOTIFY, "true"); sessionconf.put(LensConfConstants.QUERY_RESULT_EMAIL_CC, "foo1@localhost,foo2@localhost,foo3@localhost"); lensSessionId = queryService.openSession("foo@localhost", "bar", sessionconf); // @localhost should be removed // automatically createTable(TEST_TABLE); loadData(TEST_TABLE, TestResourceFile.TEST_DATA2_FILE.getValue()); wiser.start(); }
@Before public void startWiser() { wiser = new Wiser(); wiser.setHostname(SMTP_HOST); wiser.setPort(SMTP_PORT); 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); connection = new Connection(emailHost, emailPort); userInfo = new DefaultUserInfo(true); }
@Override @Before public void setUp() throws Exception { super.setUp(); wiser = new Wiser(); wiser.setPort(2500); wiser.start(); startHttpServer(); }
protected void setUp() throws Exception { super.setUp(); ChainedProperties props = new ChainedProperties("process.email.conf", ClassLoaderUtil.getClassLoader(null, getClass(), false )); setEmailHost(props.getProperty("host", "locahost")); setEmailPort(props.getProperty("port", "2345")); server = new HornetQTaskServer(taskService, 5153); System.out.println("Waiting for the HornetQTask Server to come up"); try { startTaskServerThread(server, false); } catch (Exception e) { startTaskServerThread(server, true); } client = new SyncTaskServiceWrapper(new AsyncHornetQTaskClient()); client.connect("127.0.0.1", 5153); setWiser(new Wiser()); getWiser().setHostname(getEmailHost()); getWiser().setPort(Integer.parseInt(getEmailPort())); getWiser().start(); }
@Override @BeforeClass protected void setUp() throws Exception { super.setUp(); ChainedProperties props = new ChainedProperties("process.email.conf", ClassLoaderUtil.getClassLoader(null, getClass(), false )); setEmailHost(props.getProperty("host", "locahost")); setEmailPort(props.getProperty("port", "2345")); server = new HornetQTaskServer(taskService, 5153); System.out.println("Waiting for the HornetQTask Server to come up"); try { startTaskServerThread(server, false); } catch (Exception e) { startTaskServerThread(server, true); } client = new AsyncHornetQTaskClient(); client.connect("127.0.0.1", 5153); setWiser(new Wiser()); getWiser().setHostname(getEmailHost()); getWiser().setPort(Integer.parseInt(getEmailPort())); getWiser().start(); }