This also helps to avoid warnings by the compiler about l being unused
Change-Id: Ia370ebf3e48b8309196aa61c2baa1301095ae40b
import org.cacert.gigi.util.PasswordHash;
import org.cacert.gigi.util.ServerConstants;
import org.cacert.gigi.util.TimeConditions;
import org.cacert.gigi.util.PasswordHash;
import org.cacert.gigi.util.ServerConstants;
import org.cacert.gigi.util.TimeConditions;
+import org.junit.AfterClass;
import org.junit.BeforeClass;
import sun.security.pkcs10.PKCS10;
import org.junit.BeforeClass;
import sun.security.pkcs10.PKCS10;
+ private static Link l;
+
public static Properties initEnvironment() throws IOException {
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
if (envInited) {
public static Properties initEnvironment() throws IOException {
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
if (envInited) {
+ @AfterClass
+ public static void closeDBLink() {
+ if (l != null) {
+ l.close();
+ l = null;
+ }
}
private static Properties generateProps() throws Error {
}
private static Properties generateProps() throws Error {
- private static Link l;
-
public static String createRandomIDString() {
final char[] chars = "abcdefghijklmnopqrstuvwxyz0123456789".toCharArray();
final int idStringLength = 16;
public static String createRandomIDString() {
final char[] chars = "abcdefghijklmnopqrstuvwxyz0123456789".toCharArray();
final int idStringLength = 16;