X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=tests%2Fclub%2Fwpia%2Fgigi%2FtestUtils%2FConfiguredTest.java;h=4dd091edd1aeb881f766f01826ee219c91a6a500;hp=711007a047eafe94703507f2ddac532650e8a8eb;hb=b9f6b59fc48b5acf76da58e3f02a9d7a4ef1f87c;hpb=5e75c08b32119d8b45ed0a1d900ad523f4503bb3 diff --git a/tests/club/wpia/gigi/testUtils/ConfiguredTest.java b/tests/club/wpia/gigi/testUtils/ConfiguredTest.java index 711007a0..4dd091ed 100644 --- a/tests/club/wpia/gigi/testUtils/ConfiguredTest.java +++ b/tests/club/wpia/gigi/testUtils/ConfiguredTest.java @@ -78,6 +78,15 @@ public abstract class ConfiguredTest { 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; @@ -94,7 +103,9 @@ public abstract class ConfiguredTest { 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); @@ -120,6 +131,7 @@ public abstract class ConfiguredTest { 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");