Merge pull request #330 from mposolda/master

Fix LDAP test on windows. Ensure that directory with data for embedded A...
This commit is contained in:
Stian Thorgersen 2014-04-09 18:44:57 +01:00
commit daf1f2ed45

View file

@ -1,5 +1,6 @@
package org.keycloak.model.test; package org.keycloak.model.test;
import java.io.File;
import java.io.InputStream; import java.io.InputStream;
import java.util.HashMap; import java.util.HashMap;
import java.util.Hashtable; import java.util.Hashtable;
@ -90,6 +91,13 @@ public class LDAPEmbeddedServer extends AbstractLDAPTest {
public void setup() throws Exception { public void setup() throws Exception {
// suppress emb. LDAP server start // suppress emb. LDAP server start
if (isStartEmbeddedLdapLerver()) { if (isStartEmbeddedLdapLerver()) {
// On Windows, the directory may not be fully deleted from previous test
String tempDir = System.getProperty("java.io.tmpdir");
File workDir = new File(tempDir + "/server-work");
if (workDir.exists()) {
recursiveDeleteDir(workDir);
}
super.setup(); super.setup();
} }
} }