public static Properties initEnvironment() throws IOException {
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
if (envInited) {
+ try {
+ synchronized (ConfiguredTest.class) {
+ if (l == null) {
+ l = DatabaseConnection.newLink(false);
+ }
+ }
+ } catch (InterruptedException e) {
+ throw new Error(e);
+ }
return generateProps();
}
envInited = true;
DatabaseConnection.init(testProps);
try {
synchronized (ConfiguredTest.class) {
- l = DatabaseConnection.newLink(false);
+ if (l == null) {
+ l = DatabaseConnection.newLink(false);
+ }
}
} catch (InterruptedException e) {
throw new Error(e);
mainProps.setProperty("name.www", testProps.getProperty("name.www"));
mainProps.setProperty("name.static", testProps.getProperty("name.static"));
mainProps.setProperty("name.api", testProps.getProperty("name.api"));
+ mainProps.setProperty("name.suffix", testProps.getProperty("name.suffix"));
mainProps.setProperty("appName", "SomeCA");
mainProps.setProperty("appIdentifier", "someca");
public void verify(Domain d) {
try {
d.addPing(DomainPingType.EMAIL, "admin");
- TestMail testMail = getMailReceiver().receive();
+ TestMail testMail = getMailReceiver().receive("admin@" + d.getSuffix());
testMail.verify();
assertTrue(d.isVerified());
} catch (GigiApiException e) {