X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fclub%2Fwpia%2Fgigi%2FtestUtils%2FConfiguredTest.java;h=c4fa2279e959e108e96db2b160790f21893a598e;hb=cd52b411056e1a73d9c65dfe9f6fbb82b8512bc9;hp=711007a047eafe94703507f2ddac532650e8a8eb;hpb=28b216e0a027c8d82b4db179d79974bd8d3c0aff;p=gigi.git diff --git a/tests/club/wpia/gigi/testUtils/ConfiguredTest.java b/tests/club/wpia/gigi/testUtils/ConfiguredTest.java index 711007a0..c4fa2279 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"); @@ -253,7 +265,7 @@ public abstract class ConfiguredTest { try { DatabaseManager.run(new String[] { testProps.getProperty("sql.driver"), testProps.getProperty("sql.url"), testProps.getProperty("sql.user"), testProps.getProperty("sql.password") - }, ImportType.TRUNCATE); + }, ImportType.TRUNCATE, false); } catch (ClassNotFoundException e) { e.printStackTrace(); }