@After public void tearDown() { smtpServer.stop(); }
@After public void stopWiser() { wiser.stop(); LOGGER.info("Wiser stopped."); }
public void tearDown(){ if (wiser != null) { wiser.stop(); try { Thread.sleep(1000); } catch (Throwable t) { // Do nothing } } super.tearDown(); }
@Test public void shouldThrowAnExceptionWhenUnableToSendTestEmail() { configure(); smtpServer.stop(); try { underTest.sendTestEmail("user@nowhere", "Test Message from SonarQube", "This is a test message from SonarQube."); fail(); } catch (EmailException e) { // expected } }
@After public void clean() { if (wiser != null) { wiser.stop(); try { Thread.sleep(1000); } catch (Throwable t) { // Do nothing } } super.tearDown(); if (emf != null) { emf.close(); } if (pds != null) { pds.close(); } } }
@Test public void shouldNotThrowAnExceptionWhenUnableToSendEmail() { configure(); smtpServer.stop(); EmailMessage emailMessage = new EmailMessage() .setTo("user@nowhere") .setSubject("Foo") .setMessage("Bar"); boolean delivered = underTest.deliver(emailMessage); assertThat(delivered).isFalse(); }
@Override protected void tearDown() throws Exception { wiser.stop(); // Fix for slow Jenkins Thread.sleep(250L); super.tearDown(); }
@After("@emailing") public void stopServer() { smtpServer.stop(); } }
protected void stopSMTP() { if (wiser != null) { wiser.stop(); } }
@Override protected void after() { if (mailServer.getServer().isRunning()) { LOGGER.info("Stopping mail server {} ", mailServer.hashCode()); mailServer.stop(); } }
@After public void stopSMTP() { if (wiser != null) { wiser.stop(); } }
/** * @see org.unitils.mail.SmtpServer#clean() */ @Override public void clean() { wiser.stop(); wiser = new Wiser(); wiser.setPort(port); wiser.start(); }
@Override protected void tearDown() throws Exception { wiser.stop(); // Fix for slow Jenkins Thread.sleep(250L); super.tearDown(); }
@After public void tearDown() throws Exception { System.clearProperty("org.jbpm.email.templates.dir"); if( wiser != null ) { wiser.getMessages().clear(); wiser.stop(); wiser = null; Thread.sleep(1000); } }
@After public void tearDown() throws Exception { System.clearProperty("org.jbpm.email.templates.dir"); if( wiser != null ) { wiser.getMessages().clear(); wiser.stop(); wiser = null; Thread.sleep(1000); } }
@After public void tearDown() throws Exception { if( wiser != null ) { wiser.getMessages().clear(); wiser.stop(); wiser = null; } }
@Override @After public void tearDown() throws Exception { super.tearDown(); wiser.stop(); httpServer.stop(); }
@After public void tearDownEmailTest() { //stop the fake email server (if started) if (this.fakeMailServer != null && !isMailServerStopped(fakeMailServer)) { this.fakeMailServer.stop(); assertTrue("Mail server didn't stop", isMailServerStopped(fakeMailServer)); } this.fakeMailServer = null; }
protected void tearDown() throws Exception { client.disconnect(); server.stop(); broker.stop(); getWiser().stop(); super.tearDown(); } }
@AfterClass protected void tearDown() throws Exception { client.disconnect(); server.stop(); getWiser().stop(); super.tearDown(); }