@AfterClass
public static void tearDownServer() {
String type = testProps.getProperty("type");
+ ter.destroy();
if (type.equals("local")) {
return;
}
gigi.destroy();
}
-
@After
public void removeMails() {
ter.reset();
}
}
} catch (IOException e) {
- e.printStackTrace();
+ if (!closed) {
+ e.printStackTrace();
+ }
}
}
clearMails();
approveRegex = Pattern.compile(".*");
}
+ boolean closed = false;
+ public void destroy() {
+ try {
+ closed = true;
+ s.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
}